【问题标题】:How to implement "click and don't wait for page reload" in Selenium2Library in Robot Framework?如何在 Robot Framework 的 Selenium2Library 中实现“单击而不等待页面重新加载”?
【发布时间】:2014-09-11 00:33:23
【问题描述】:

我在Robot Framework 中使用Selenium2Library。我想点击网页中的链接,但不想等待页面重新加载。

在 Robot Framework 中使用SeleniumLibrary 时,用户可以使用这个命令:

| Click Link |  link text    |                      # A page is expected to load.
| Click Link |  another link |  don't wait |        # A page is not expected to load.

但我在 Selenium2Library 中找不到等效的命令。

如何在Robot Framework的Selenium2Library中实现“点击不等待页面重新加载”?

【问题讨论】:

  • 你接受了我的回答(谢谢!),所以我很好奇哪些建议对你有用。
  • @BryanOakley 我正在使用方法Mouse Down followed by Mouse Up。如果我使用Click Link,它将等待页面重新加载。如果我使用Mouse Down followed by Mouse Up,它不会等待页面重新加载。感谢您的帮助!

标签: selenium selenium-webdriver robotframework


【解决方案1】:

您可以尝试使用Simulate 关键字来模拟对元素的点击,而不是调用其中一个点击关键字。浏览代码,我看不到它在执行模拟事件后在哪里进行任何等待。您也可以尝试编写自己的关键字,调用Mouse Down,后跟Mouse Up

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-04-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-15
    • 2016-10-13
    • 1970-01-01
    相关资源
    最近更新 更多