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

查看:33
本文介绍了使用 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天全站免登陆