Incorrect Resolution and Coordinates Out of Bounds Error in CarPlay
Problem
When running CarPlay tests on iOS 26 and later, the Head Unit (HU) CarPlay screen resolution returned by getScreenshot or getDump may differ from the requested resolution.
For example, if the requested HU resolution is 800x480, the returned resolution may be 850x510. This resolution mismatch can cause tap commands to fail, particularly when tapping near the edges of the CarPlay screen. The test may fail with the following error:
org.openqa.selenium.UnsupportedCommandException: Coordinates are out of bounds
Cause
This issue can occur when Smart Display Zoom is enabled in the CarPlay simulator.
Smart Display Zoom automatically resizes the CarPlay display, which can cause a mismatch between the requested screen resolution and the coordinates reported by the simulator.
Solution
Disable Smart Display Zoom in the CarPlay simulator on the DHM machine.
- Open the Settings app in the CarPlay simulator.
- Go to Display.
- Locate Smart Display Zoom.
- Turn Smart Display Zoom off.
- Restart the CarPlay session.
- Verify that the resolution returned by
digitalai:automotive.getScreenshotmatches the requested HU resolution.
After disabling Smart Display Zoom, the reported resolution and screen coordinates should align with the requested HU resolution, allowing tap commands to execute correctly.