cheezy / page-object

Gem to implement PageObject pattern in watir-webdriver and selenium-webdriver
MIT License
653 stars 220 forks source link

How to change the global implicit element wait time? #490

Closed MiluchOK closed 3 years ago

MiluchOK commented 5 years ago

Hello, I am having a really hard time figuring out how to globally change the implicit wait time for elements. It is setup to 30 seconds by Watir and I do not see how I can have control over it. The way I init the driver is : driver = Selenium::WebDriver.for :chrome And then I just feed the driver to my Page Objects like this: page = SomePage.new(driver, visit=true)

I tried to change the wait through the driver, but since Watir is being used under the hood, the implicit wait I setup on the WebDriver is not respected. (Might be a decent feature to respect the implicit wait that was set on the original driver?)

Thanks.

jkotests commented 5 years ago

Try doing:

Watir.default_timeout = 10 # sec

Out of curiosity, are you using Selenium in the page-object instead of Watir? I've been trying to understand the number of users we have using Selenium vs Watir.

jkotests commented 3 years ago

Closing due to inactivity. If this is still an issue please re-open the ticket.