How to use watir-webdriver to wait for page load

后端 未结 7 1853
后悔当初
后悔当初 2021-02-01 21:34

Using watir-webdriver, how do I wait for a page to load after I click a link?

At the moment I am using:

sleep n

But this is not ideal a

相关标签:
7条回答
  • 2021-02-01 22:29

    browser.wait_until can be used.

    It's more helpful because you can define what to wait for in the parameters (()), as in:

    browser.wait_until(browser.text.include("some text"))
    
    0 讨论(0)
提交回复
热议问题