0

unfortunately im facing following unknown error while executing my automated test:

--> error: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: io.appium.uiautomator2.common.exceptions.UiAutomator2Exception: Timed out after 15536ms waiting for the root AccessibilityNodeInfo in the active window. Make sure the active window is not constantly hogging the main UI thread (e.g. the application is being idle long enough), so the accessibility manager could do its work

Environment:

  • Appium version 2.0.1

  • Desktop OS/version used to run Appium: macosVentura 13.4.1

  • Node.js version: 20.5.0

  • Mobile platform/version under test: Android 13, API-33 emulator image

  • Real device or emulator/simulator: emulator

  • Appium CLI or Appium.app|exe: Appium android driver for .net

Code:

desired caps:

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();         desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "android");         desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "13");         desiredCapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Pixel5");         desiredCapabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "UiAutomator2");         desiredCapabilities.setCapability(MobileCapabilityType.APP, "/Users/name.surname/IdeaProjects/android-automation/src/test/ressources/SysUT/staging.apk");         desiredCapabilities.setCapability("autoGrantPermissions", true);         desiredCapabilities.setCapability("appium:uiautomator2ServerInstall", false);         desiredCapabilities.setCapability("appium:uiautomator2ServerLaunchTimeout", 100000);         desiredCapabilities.setCapability("appPackage", "...");         desiredCapabilities.setCapability("appActivity", "..."); 

element under test where the error occurs:

//ClickLogin
        WebElement pressLogin = driver.findElement(AppiumBy.xpath("//*[@resource-id='ButtonID']"));
        pressLogin.click();
        testLogin.log(Status.PASS, "logged in with correct credentials!");
        testLogin.log(Status.INFO, "user has successfully logged in with his credentials");

I'm facing the error shown above randomly while running my test script.

The test scenario runs smoothly until it comes to clicking the login button on the page. The error occurs every time. Sometimes the tests did run smoothly in the past, especially before the switch into jetpack compose. Currently I don't have a clean execution anymore at any time. It made no difference to use either the xpath or accessibilityID.

I have a feeling that this error occurred after the app layout was changed in Compose.

I also have already tried different variations of wait methods before the element appears.

Maybe someone knows about this error. If more info is needed, feel free to ask for it.

Thanks in advance.

TraFFy
  • 3
  • 3

0 Answers0