开发者

How do I use Watir::Waiter::wait_until to force Firefox to wait?

I have some buttons that get disabled when adding a user.

What I need to be able to do is have firewatir wait_until something is present.

I am trying to use this right now:

count = 10
while count > 0
browser.button(:name, "_eventId_addEmployee").click
Watir::开发者_JAVA百科Wait.wait_until_present {text.exist? newHireUsername}
end
count -= 1
end

For some reason I can't get the wait_until method to work correctly.

Thanks in advance!


I usually do something like this,

browser.element_type(:id, "xxx").wait_until_present


Instead of using the wait_until_present option I used an until loop to wait for text to appear.
This by-passed attempting to use it so it does not qualify as an answer for my original question but want it here for others.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜