简体   繁体   中英

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::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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM