mido mido - 5 months ago 156x
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.


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

pauses queue execution for a specific amount of time