使用Appium和Ruby测试iOS应用程序时是否等待加载元素? [英] Wait for element to load when testing an iOS app using Appium and Ruby?

查看:133
本文介绍了使用Appium和Ruby测试iOS应用程序时是否等待加载元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测试iOS应用,登录后无法与元素进行交互,因为Appium的速度太快了。

I am testing an iOS app, and can't interact with the elements after logging in because Appium is going too fast.

有人可以指点我使用WebDriverWait样式等待Appium iOS测试的例子?最好是在Ruby中。

Can someone please point me to an example of using a WebDriverWait style of waiting for Appium iOS testing? Preferably in Ruby.

谢谢。

推荐答案

这对我有用但我是Appium的新手

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

这篇关于使用Appium和Ruby测试iOS应用程序时是否等待加载元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆