Watir post: use keywords instead of passing arguments to the #wait_until_present method

I am using watir with firefox to capture a webpage after filling out a form. Here is the short part of my code:

browser.button(:type => 'submit').click
sleep 10
browser.element(:id => 'footer').wait_until_present(timeout=30)
html = browser.html

This message appears:

Instead of passing arguments into #wait_until_present method, use Keywords

What does it mean? How can i solve this? Thanks for the help.

+4
source share
2 answers

Answer to the new Watir 6.0 FAQ: http://watir.imtqy.com/watir-6-faq/#G

In your case, change the value from timeout=30to timeout: 30and you will not see a warning message.

+8
source

Watir API says #wait_until_present(timeout = nil) ⇒ Object

timeout = nil , -, .

browser.element(:id => 'footer').wait_until_present(30)
0

Source: https://habr.com/ru/post/1661333/


All Articles