I have a website that has a <h1> element.
This element has value x as innerhtml at page load and value y after z seconds.
I don't know what the values of x and y are, because they change frequently. z could be anywhere between 0 to 5. I can't use wait_until or wait_while because of this. So this really wouldn't work, because I don't know what to wait for.
Watir::Wait.until(5) { element.text == "abracadabra" }
So really I need to wait for 5 seconds and then check the text of the element. Does Watir has some kind of timout function I can use? Like the javascript setTimeout()
?
没有评论:
发表评论