admin 管理员组文章数量: 1086019
For testing, I am loading a page and clicking a button, I am using webdriver.io for testing Since the page is quite heavy, it takes a bit of time to load, I would like the global variable browser
to wait few seconds before clicking the button.
I know there is waitForVisible
method, but not good enough, I still have no idea if the js has added click event to the button, I am looking for something similar to sleep
method in selenium webdriver.
For testing, I am loading a page and clicking a button, I am using webdriver.io for testing Since the page is quite heavy, it takes a bit of time to load, I would like the global variable browser
to wait few seconds before clicking the button.
I know there is waitForVisible
method, but not good enough, I still have no idea if the js has added click event to the button, I am looking for something similar to sleep
method in selenium webdriver.
2 Answers
Reset to default 5I think you are asking about the pause()
method:
pauses queue execution for a specific amount of time
Since using pause()
is not a good practice, you can use waitForExist()
as an alternative
本文标签: javascriptWebDriverio how to make browser pause waitStack Overflow
版权声明:本文标题:javascript - WebDriver.io: how to make browser pause wait? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/p/1744021810a2519931.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论