OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

I've Just begin the learning the Appium to automate the application

  • Thread starter Thread starter Monkey
  • Start date Start date
M

Monkey

Guest
I have a ''accessibility id Suppliers\nTab 2 of 2'' , ''xpath //android.view.View[@content-desc="Suppliers Tab 2 of 2"] '' Copied pasted from Appium Inspector and i am using the accessibility id as

Code:
    AndroidDriver driver = new AndroidDriver(new URI("http://127.0.0.1:4723/wd/hub").toURL(), capabilities);
   

    WebDriverWait Wait = new WebDriverWait(driver, Duration.ofSeconds(10));
    Wait.until(ExpectedConditions.visibilityOfElementLocated(AppiumBy.accessibilityId("Suppliers\\nTab 2 of 2")));

    driver.findElement(AppiumBy.accessibilityId("Suppliers\\nTab 2 of 2")).click();

and the problem i am facing is that "org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by AppiumBy.accessibilityId: Suppliers\nTab 2 of 2 (tried for 10 second(s) with 500 milliseconds interval)"

I was trying to click the element and i've tried using the corrrect accessibilty id driver.findElement(AppiumBy.accessibilityId("Suppliers\nTab 2 of 2")).click();
<p>I have a ''accessibility id Suppliers\nTab 2 of 2'' , ''xpath //android.view.View[@content-desc="Suppliers Tab 2 of 2"] '' Copied pasted from Appium Inspector and i am using the accessibility id as</p>
<pre><code> AndroidDriver driver = new AndroidDriver(new URI("http://127.0.0.1:4723/wd/hub").toURL(), capabilities);


WebDriverWait Wait = new WebDriverWait(driver, Duration.ofSeconds(10));
Wait.until(ExpectedConditions.visibilityOfElementLocated(AppiumBy.accessibilityId("Suppliers\\nTab 2 of 2")));

driver.findElement(AppiumBy.accessibilityId("Suppliers\\nTab 2 of 2")).click();
</code></pre>
<p>and the problem i am facing is that "org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by AppiumBy.accessibilityId: Suppliers\nTab 2 of 2 (tried for 10 second(s) with 500 milliseconds interval)"</p>
<p>I was trying to click the element and i've tried using the corrrect accessibilty id driver.findElement(AppiumBy.accessibilityId("Suppliers\nTab 2 of 2")).click();</p>
Continue reading...
 

Latest posts

Top