bbangert / lettuce_webdriver

Selenium webdriver for lettuce
MIT License
81 stars 32 forks source link

Use of selenium API breaks implicit waits #11

Open rbu opened 13 years ago

rbu commented 13 years ago

The Selenium webdriver supports setting implicit wait timeouts when selecting elements, as described here https://code.google.com/p/selenium/wiki/RubyBindings#Timeouts To test this, try setting

``` world.browser.implicitly_wait(2)

Unfortunately, several of lettuce_webdriver's steps do not use the Selenium API in a way to support this feature. In particular, all element queries and all of an element's content checks have to be sent to the selenium remote in one command.

For example, this does not work: text not in world.browser.page_source

Additionally, queries like this create an increased slowdown:

    find_field(world.browser, 'textarea', field_name) or \
    find_field(world.browser, 'password', field_name)```

Since the lack of implicit waits may be a blocker for us, maybe you could give us an idea of whether you want to support it and when.

Thanks,

Robert
bbangert commented 13 years ago

I'm completely open to a patch to use the implicit waits, I'd be happy to have this support in lettuce_webdriver.