是否可以使用 watir 在浏览器中导航回来?
我正在创建一个自动化测试,该测试应该向后导航几个步骤。 在 Watir 可以这样做吗?
我正在导航到结果列表页面,并且希望只需单击“返回”(Windows 浏览器)即可返回到测试的开始处。 谢谢
I'm creating an automated tests that should navigate back a few steps.
Is it possible to do so in Watir??
I'm navigating to a resultlist page and want to go back to the start of my test just by clicking back (windows browser).
Thnx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您有 Watir::IE 对象,那么 #back 是一种可以执行您正在查找的操作的方法:
您看到什么错误?
If you have a Watir::IE object, then #back is a method that does what you are looking for:
What error are you seeing?
这就是我尝试这样做的方式:
This is how i tried to do it:
使用 Watir 的 #back 调用的示例代码(基于 标准维基百科示例):
Example code that uses Watir's #back call (based on the standard Wikipedia example):
您当然可以使用 Watir 执行 JavaScript。
You certainly can execute JavaScript using Watir.