Wait for element to load when testing an iOS app using Appium and Ruby?

Aaron Shaver picture Aaron Shaver · Jul 18, 2013 · Viewed 23.8k times · Source

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.

Answer

user1919861 picture user1919861 · Aug 8, 2013

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