question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UIAutomator2 incorrectly defines element coordinates and size on bottom of edgeless screen

See original GitHub issue

Hi! I’ve stumbled upon the following problem: i have Samsung A10 (screen from edge to edge) When i get size and location of element from middle or top of screen, everything is ok. But if i get size and location of element from bottom of screen, uiautomator2 returns location values that more than screen size. getDriver().manage().window().getSize() returns size of 720 x 1382 (size of screen) find(<element from bottom of screen>).getLocation() returns points 58 x 1406 (y-coordinate more than screen height)

Appium logs [HTTP] --> POST /wd/hub/session/edcae5f9-7065-4e55-b245-25acf2ad5423/element [HTTP] {"using":"xpath","value":"//*[@text='Поиск']"} [debug] [W3C (edcae5f9)] Calling AppiumDriver.findElement() with args: ["xpath","//*[@text='Поиск']","edcae5f9-7065-4e55-b245-25acf2ad5423"] [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator [debug] [BaseDriver] Waiting up to 2000 ms for condition [debug] [WD Proxy] Matched '/element' to command name 'findElement' [debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:8200/wd/hub/session/8e9b36c2-0de4-4cb2-aadb-998bcf7d116e/element] with body: {"strategy":"xpath","selector":"//*[@text='Поиск']","context":"","multiple":false} [debug] [WD Proxy] Got response with status 200: {"sessionId":"8e9b36c2-0de4-4cb2-aadb-998bcf7d116e","value":{"ELEMENT":"6892662f-8282-4aa6-b74b-ec17cea7bc08","element-6066-11e4-a52e-4f735466cecf":"6892662f-8282-4aa6-b74b-ec17cea7bc08"}} [debug] [W3C (edcae5f9)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"6892662f-8282-4aa6-b74b-ec17cea7bc08","ELEMENT":"6892662f-8282-4aa6-b74b-ec17cea7bc08"} [HTTP] <-- POST /wd/hub/session/edcae5f9-7065-4e55-b245-25acf2ad5423/element 200 588 ms - 137 [HTTP] [HTTP] --> GET /wd/hub/session/edcae5f9-7065-4e55-b245-25acf2ad5423/element/6892662f-8282-4aa6-b74b-ec17cea7bc08/size [HTTP] {} [W3C (edcae5f9)] Driver proxy active, passing request on via HTTP proxy [debug] [WD Proxy] Matched '/wd/hub/session/edcae5f9-7065-4e55-b245-25acf2ad5423/element/6892662f-8282-4aa6-b74b-ec17cea7bc08/size' to command name 'getSize' [debug] [WD Proxy] Proxying [GET /wd/hub/session/edcae5f9-7065-4e55-b245-25acf2ad5423/element/6892662f-8282-4aa6-b74b-ec17cea7bc08/size] to [GET http://localhost:8200/wd/hub/session/8e9b36c2-0de4-4cb2-aadb-998bcf7d116e/element/6892662f-8282-4aa6-b74b-ec17cea7bc08/size] with body: {} [debug] [WD Proxy] Got response with status 200: {"sessionId":"8e9b36c2-0de4-4cb2-aadb-998bcf7d116e","value":{"width":64,"height":27}} [WD Proxy] Replacing sessionId 8e9b36c2-0de4-4cb2-aadb-998bcf7d116e with edcae5f9-7065-4e55-b245-25acf2ad5423 [HTTP] <-- GET /wd/hub/session/edcae5f9-7065-4e55-b245-25acf2ad5423/element/6892662f-8282-4aa6-b74b-ec17cea7bc08/size 200 46 ms - 85 [HTTP]

[HTTP] --> POST /wd/hub/session/cc2753d9-4bad-4793-8877-121f12c76e8f/element [HTTP] {"using":"xpath","value":"//*[@text='Поиск']"} [debug] [W3C (cc2753d9)] Calling AppiumDriver.findElement() with args: ["xpath","//*[@text='Поиск']","cc2753d9-4bad-4793-8877-121f12c76e8f"] [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator [debug] [BaseDriver] Waiting up to 2000 ms for condition [debug] [WD Proxy] Matched '/element' to command name 'findElement' [debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:8200/wd/hub/session/2f63bdc9-b125-4850-ba87-aa8ec33ce5f7/element] with body: {"strategy":"xpath","selector":"//*[@text='Поиск']","context":"","multiple":false} [debug] [WD Proxy] Got response with status 200: {"sessionId":"2f63bdc9-b125-4850-ba87-aa8ec33ce5f7","value":{"ELEMENT":"c52eec2a-64a9-43bf-9cfb-f6f9e27f8b63","element-6066-11e4-a52e-4f735466cecf":"c52eec2a-64a9-43bf-9cfb-f6f9e27f8b63"}} [debug] [W3C (cc2753d9)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"c52eec2a-64a9-43bf-9cfb-f6f9e27f8b63","ELEMENT":"c52eec2a-64a9-43bf-9cfb-f6f9e27f8b63"} [HTTP] <-- POST /wd/hub/session/cc2753d9-4bad-4793-8877-121f12c76e8f/element 200 793 ms - 137 [HTTP] [HTTP] --> GET /wd/hub/session/cc2753d9-4bad-4793-8877-121f12c76e8f/element/c52eec2a-64a9-43bf-9cfb-f6f9e27f8b63/location [HTTP] {} [W3C (cc2753d9)] Driver proxy active, passing request on via HTTP proxy [debug] [WD Proxy] Matched '/wd/hub/session/cc2753d9-4bad-4793-8877-121f12c76e8f/element/c52eec2a-64a9-43bf-9cfb-f6f9e27f8b63/location' to command name 'getLocation' [debug] [WD Proxy] Proxying [GET /wd/hub/session/cc2753d9-4bad-4793-8877-121f12c76e8f/element/c52eec2a-64a9-43bf-9cfb-f6f9e27f8b63/location] to [GET http://localhost:8200/wd/hub/session/2f63bdc9-b125-4850-ba87-aa8ec33ce5f7/element/c52eec2a-64a9-43bf-9cfb-f6f9e27f8b63/location] with body: {} [debug] [WD Proxy] Got response with status 200: {"sessionId":"2f63bdc9-b125-4850-ba87-aa8ec33ce5f7","value":{"x":58,"y":1406}} [WD Proxy] Replacing sessionId 2f63bdc9-b125-4850-ba87-aa8ec33ce5f7 with cc2753d9-4bad-4793-8877-121f12c76e8f [HTTP] <-- GET /wd/hub/session/cc2753d9-4bad-4793-8877-121f12c76e8f/element/c52eec2a-64a9-43bf-9cfb-f6f9e27f8b63/location 200 69 ms - 78 [HTTP]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
qaschevychelovcommented, Nov 5, 2020

@remimarenco i created the bug in issueTracker for Android SDK. They set minor priority and i don’t see any activities with this bug. We are still using devices without edgeless screen for automation. Now i’m researching in cloud device farm approach. I came to a conclusion that it’s easier to give test balancing for the third parties. Maybe there is no such problem with cloud farm devices. But i haven’t tryed yet

0reactions
remimarencocommented, Nov 2, 2020

@qaschevychelov Do you have a summary of what was the issue and if you solved it? We have also troubles with this on Gestures (component is not at the right coordinates, it seems like).

We can’t see the content of the issuetracker unfortunately.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get screen coordinate of a element in selenium? [Python]
You can use .size and .location to get the sizes. Try this: from selenium import webdriver from selenium.webdriver.common.keys import Keys ...
Read more >
maximized window - CSDN
await driver.maximize(“handleName”); // Set size of window by handle name ... If 'current' it will get size of current window ...
Read more >
Silk Test Classic Open Agent Help Micro Focus The Lawn 22 ...
This section provides information to get you up and running with Silk Test Classic. Note: If you have opted not to display the...
Read more >
https://git.tuerantuer.org/Integreat/integreat-app...
**/fastlane/README.md # Ignore autogenerated version file -version.json \ No newline at end of file +version.json diff --git a/README.md b/README.md index ...
Read more >
Goodwe modbus register - AKADEMIE KESSLER
There are three steps to configure and monitor a Modbus device on the Tigo website Portal. vault girls. advanced camp opord ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found