Appium Pixel Resolution acceptance


#1

Hi there, I am trying to automate the app and facing the below issue… I have the latest version of Appium (Appium-1.7.1)

Appium only accepts 1280 height x 656 width px to locate the elements by ID or co-ordinates. If the element that I am trying to select is above this range like 1285x757 then this is not supported by Appium.

Due to this there are issues in getting the functionality to be tested. Is there any way to fix this issues with Appium?


#2

Latest version of Appium is 1.9.1:

Latest Appium-desktop version is 1.7.1:

… there is a difference :slight_smile:

I’m not sure if I understand your problem , but let me try… I guess your emulator/real device has 1280x656 resolution. And your image on the screen is wider (1285x757). Appium can sensor only what is displayed on the screen, so if you ask for the size of this element, it can only return you size up to his screen bounds (and not beyond).

E.g. If this image is in top left corner (and in fullscreen mode), it will return you the width=656 and the height=1280 (in Portrait screen orientation), which is devices screen resolution.

Also, if element has at least 1 px on the screen, you can still find it by ID or XPath.

I believe this limitation is not caused by Appium and it’s not in their power to fix it. :slight_smile:


#3

Hello, Thanks for your quick response.
The Actual Issue:
I am testing in Landscape mode
The bounds of the screen that I am testing is 1280,765
I tried to get the size from
driver.manage().window().getSize().getHeight()
driver.manage().window().getSize().getWidth()

I am getting 1280,656
Since the combination for the element that I am picking has pixel value as 1280,765 which is beyond the range, I think its not picking.

Please let me know if there is a workaround for this.