Tuesday 15 September 2015

Watir implicit_wait doesn't seem to work -


We are currently using Waiter-WebDriver (0.6.2), which has Firefox to run the acceptance test. It takes a long time to run our tests, and often fails with timeout errors
  browser = water :: browser. New ("Firefox") browser.driver We are trying:  .manage.timeouts.implicit_wait = 3   

However, we are still experiencing 30 time periods .

We did not find any documentation or questions about this problem. Does anyone know how to properly configure the water wait timeout? "post-text" itemprop = "text">

It really depends on the 'timeout'. There are three different definitions of the timetable commonly discussed when talking about AAAIiact Water-WebDriver:

  1. How long does a browser wait to load?
  2. Water-WebDriver How long clearly to consider an element 'not present' or 'not visible' Wait before. > Please wait for an object to wait before calling, 'not present' or 'not visible' (when explicitly waiting for the call to stop # 2) < H3> # 1: Page Load

    Justin is right that you can determine the page load timeout that your goal is to modify, though the legal way to do this is that before creating the browser, Time to end And create it on the browser:

      customer = selenium :: WebDriver :: Remote :: HTTP :: default.new client.timeout = 180 # Seconds Default is 60 B = Water :: Browser. New: Firefox ,: http_client = & gt; Client   

    # 2: Explicit timeout

    But I think @ p0deje is right that you are facing a clear timeout Although it is not possible to say without confirmation of your code, I have experienced the underlying overriding of the clear declaration in the bottom (I am sure if it is deliberately):

      b = water :: browser. New: Firefox puts B.driver.manage.timeouts.implicit_wait = 3 Time.now # = & gt; 2013-11-14 16:24:12 +0000 Start Browser.Link (: id = & gt; 'some ettats note here'). When_Posger.ClickHelp = & gt; E says E = = & gt; After 30 seconds expired, {: id = & gt; "SomeIdThatIsNotThere" ,: tag_name = & gt; "A"} Waiting to be the current ending Time.now # = & gt; 2013-11-14 16:24:43 +0000   

    Thanks to 'when-present' before failing by default, Watir-Webdriver will wait 30 seconds. Alternatively, you can say, 'Change from default to' (10) 'default and wait 10 seconds (.) I can not do God in any way to do this worldwide. Unless you find such a thing - and please let me know what you do - it should be done on every call. :( Edit :. Edit 2 : @jirib added watcher, according to the adjustments, according to the answer: "Update: this monkey patch in the water-webdriver Has been added and will no longer be required in the Water-WebDriver v0.6.5. You will be able to set the timeout to use: Watir.default_timeout = 90 "

    # 3 full timeout

    Determines the time code provided by the water-webdriver Will clearly wait for any element that says:

      b = waitir :: browser .new: Firefox b.driver.manage.timeouts .implicit_wait = 3 puts time.new # => 2013-11-14 16:28:33 +0000 Browser Start Browser.Link (: ID = & gt; 'It does not have any notes'). Whenever anything It does not, then it says that, "AidTace Notathere" ,: tag_name = & gt; "A"} puts the end time. # # & Gt; 2013- 11-14 16:28:39 +0000    

No comments:

Post a Comment