Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Is there an aim to be compatible with the Selenium driver? #42

Closed
KieranP opened this issue May 2, 2011 · 2 comments
Closed

Is there an aim to be compatible with the Selenium driver? #42

KieranP opened this issue May 2, 2011 · 2 comments

Comments

@KieranP
Copy link

KieranP commented May 2, 2011

I've started porting our test suite from Cucumber/Firewatir to Cucumber/Capybara. The selenium driver works really nicely.

We eventually want to use this gem, so that things run tons quicker.

Sadly, a fully green test suite on the selenium driver is failing when we switch to the webkit driver. Infact, over 50% of the specs that work in selenium are failing in webkit. "11 scenarios (6 failed, 5 passed)"

Any chance that the webkit API could be compatible with the selenium one?

Errors I get, that work in selenium, but fail in webkit include:

undefined method `to_xpath' for #<Capybara::Element tag=""> (NoMethodError)

Capybara::TimeoutError (Capybara::TimeoutError)

Unable to find './/*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')][((./@id = 'user_email' or ./@name = 'user_email') or ./@id = //label[normalize-space(string(.)) = 'user_email']/@for)] | .//label[normalize-space(string(.)) = 'user_email']//.//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')] | .//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')][((./@id = 'user_email' or ./@name = 'user_email') or ./@id = //label[contains(normalize-space(string(.)), 'user_email')]/@for)] | .//label[contains(normalize-space(string(.)), 'user_email')]//.//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')]' (Capybara::ElementNotFound)

The syntax is very basic, using what is available on the Capybara gem Readme and RDoc, so I come here because I'm guessing it's an API compatibility issue.

Are you aware of these issues, or does the webkit driver work the same as selenium for you and thus you don't get the errors I'm seeing? Maybe the version of QT is too new (just installed on Friday last week).

Any ideas?

@jferris
Copy link
Contributor

jferris commented May 2, 2011

Our goal is to be 100% compatible with the capybara driver specification. You can help out with this if you'd like, by checking out the driver and uncommenting some of the integration specs.

In general, compatibility between applications and capybara-webkit is going to be worse right now because selenium is more mature. However, there are always subtle differences between every driver, so capybara-webkit will never be 100% bug-for-bug compatible with selenium.

@jferris
Copy link
Contributor

jferris commented May 2, 2011

I'm going to close this issue, because it's too vague to really be resolved. Feel free to open issues for individual incompatibilities that should be considered bugs. If you do report bugs, please include examples from your test code and production code where possible - just a backtrace will probably not be enough.

@jferris jferris closed this as completed May 2, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants