rtomac/robotframework-selenium2library — Issue #17: Newly added implicitly_wait functionality not behaving as expected. Added tests.
Author: emanlove
Created: 2011-12-15 01:23:35+00:00
State: open

My recently added changes to implement Selemiun 2's [implicitly_wait functionality](http://seleniumhq.org/docs/04_webdriver_advanced.html#explicit-and-implicit-waits) don't seem to have the behavior I expected. I should have written some test code *BEFORE* I wrote code to implement the functionality but I didn't. I am working on correcting that bad behavior by adding some tests which can be found under my branch [selemium-implicit-wait](https://github.com/emanlove/robotframework-selenium2library/tree/selemium-implicit-wait).

The tests look to see whether or not an element is present after a button push results in that additional element after a delay. The test page I lifted directly from the test code of Selenium (thinking what better way to test then in a similar matter as Selenium itself). Here are a couple of example tests

```robotframework
*** Settings ***
Resource ../resource.txt

*** Test Cases ***
Implicit Wait 10 seconds For 4000 Element
Set Selenium Speed 0 seconds
Set Selenium Timeout 0 seconds
Set Selenium Implicit Wait 10 seconds
Go To Page "javascript/dynamic_timeout.html?timeout=4000"
Page Should Not Contain Element css=html body div#box0.redbox
Click Element adder
Page Should Contain Element css=html body div#box0.redbox

# ...

Implicit Wait 0 seconds For 4000 Element
Set Selenium Speed 0 seconds
Set Selenium Timeout 0 seconds
Set Selenium Implicit Wait 0 seconds
Go To Page "javascript/dynamic_timeout.html?timeout=4000"
Page Should Not Contain Element css=html body div#box0.redbox
Click Element adder
Page Should Not Contain Element css=html body div#box0.redbox

# ...
```

The former sets the implicit wait to 10 seconds and expects the red box (i.e. the delayed added element) which should appear after 4 seconds. The latter sets the implicit wait to zero seconds and should not expect to see the element as it doesn't appear immediately. Now these [initial tests](https://github.com/emanlove/robotframework-selenium2library/commit/76d1e8817d6ee2dd576d620cd41b359f6c138cda), which are failing, are just that preliminary. I am not sure whether they are just poorly written or wrong tests (is one of the test keywords or the initial set_implict_wait default playing with the timing), or whether my implicit_wait rb-s2library code is coded wrong, or whether something within robotframework design is conflicting with how to Selenium 2 library implements the implicit wait functionality, or whether something else or a combination of issues are causing the initial tests to fail?

But I wanted to push these initial tests onto my branch to make others aware of the issues I am seeing and show what steps I am taking to look into them. I welcome any collaborators!!!