mido mido - 2 years ago 493
Javascript Question

WebDriver.io: how to make browser pause/ wait?

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

to wait few seconds before clicking the button.

I know there is
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
method in selenium webdriver.

Answer Source

I think you are asking about the pause() method:

pauses queue execution for a specific amount of time

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download