I am testing an iOS app, and can't interact with the elements after logging in because Appium is going too fast.
Can someone please point me to an example of using a WebDriverWait style of waiting for Appium iOS testing? Preferably in Ruby.
Thanks.
In explicit wait, we tell the web driver instance to wait for a certain condition invoked through ExpectedConditions . So, this wait applies explicitly to the specified element. Explicit wait can be invoked using this code: WebDriverWait wait = new WebDriverWait(appiumDriver, 10);wait.
BrowserStack App Automate enables you to test native and hybrid mobile applications using Appium automation framework. Its easy to run your Appium tests written in Ruby on real Android and iOS devices on BrowserStack.
//Selecting Element MobileElement pElement = (MobileElement) driver. findElementByAccessibilityId("SomeAccessibilityID"); //Checking if it displayed on screen. boolean isDisplayed = pElement.
This worked for me but I am new to Appium
#code that navigated to this page
wait = Selenium::WebDriver::Wait.new :timeout => 10
wait.until { @driver.find_element(:name, 'myElementName').displayed? }
#code that deals with myElementName
I use this construction to wait some element appears:
wait_true { exists { find_element(:xpath, path_to_element) } }
Of course, you can find not only by :xpath
.
Also you can set timeout:
wait_true(timeout) { exists { find_element(:xpath, path_to_element) } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With