0

Using Appium 8.0.0 + selenium java 4.1.3 + java 11.0.4

  • running tests on remote appium node connected to selenium grid 4 ( in standalone mode )
  • using appium automationName UiAutomator2

following code throws UnreachableBrowserException

AndroidDriver driver = (AndroidDriver) super.getDriver();
List<WebElement> itemList = driver.findElements(AppiumBy.accessibilityId("loginUser"));

Exception

org.openqa.selenium.remote.UnreachableBrowserException: 
Error communicating with the remote browser. It may have died.
Build info: version: '4.1.3', revision: '7b1ebf28ef'
System info: host: 'PC44', ip: '192.168.30.60', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.4'
Driver info: io.appium.java_client.android.AndroidDriver
Command: [5c0a3278-0c08-45b6-84e4-89940078746a, findElements {using=accessibility id, value=loginUser}]
Capabilities {...}
Session ID: 5c0a3278-0c08-45b6-84e4-89940078746a
Caused by: java.lang.StackOverflowError

io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:182)
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:567)
org.openqa.selenium.remote.ElementLocation$ElementFinder$2.findElements(ElementLocation.java:179)
org.openqa.selenium.remote.ElementLocation.findElements(ElementLocation.java:108)
org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:400)
org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:392)
io.appium.java_client.AppiumBy.findElements(AppiumBy.java:41)
org.openqa.selenium.remote.ElementLocation$ElementFinder$1.findElements(ElementLocation.java:146)
org.openqa.selenium.remote.ElementLocation.findElements(ElementLocation.java:121)
org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:400)
org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:392)
io.appium.java_client.AppiumBy.findElements(AppiumBy.java:41)
org.openqa.selenium.remote.ElementLocation$ElementFinder$1.findElements(ElementLocation.java:146)
org.openqa.selenium.remote.ElementLocation.findElements(ElementLocation.java:121)
org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:400)
org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:392)
io.appium.java_client.AppiumBy.findElements(AppiumBy.java:41)
org.openqa.selenium.remote.ElementLocation$ElementFinder$1.findElements(ElementLocation.java:146)
org.openqa.selenium.remote.ElementLocation.findElements(ElementLocation.java:121)
org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:400)
org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:392)
io.appium.java_client.AppiumBy.findElements(AppiumBy.java:41)
...

interestingly find by xpath locators works just fine (this code returns valid data)

List<WebElement> itemList = driver.findElements(AppiumBy.xpath("//android.view.ViewGroup[@content-desc="loginUser"]"));

On previous appium version(7.6.0) there was no issue finding elements by accessibilityId

any help greatly appreciated

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.