-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selenium 3 support #254
Comments
Well, according to previous community reports about it, Selenium 3 should work fine when using Chrome, but the new Firefox driver is not yet feature complete. Running our CI against Selenium 3 is on my TODO list. |
This is indeed Firefox, will check with chrome, feel free to close if test passes. |
Since Selenium 3 now supports Safari (version 10), would be good to test against it as well. |
@JoaoGFarias see #257 for discussions about the CI setup |
https://github.com/instaclick/php-webdriver doesn't seem to support selenium 3, so perhaps a shift to something like https://github.com/facebook/php-webdriver? |
For reference I have been testing with firefox and geckodriver, and have had some partial success. |
instaclick/php-webdriver#80 should give another hint why any support of Selenium 3.5 is now really neccessary |
Yes that is the one issue I had with that driver. Perhaps instaclick will update to support both 2.x and 3.x? |
@tawfekov , you can open at https://github.com/instaclick/php-webdriver/issues as well. |
At Instaclick, we're drifting towards stability (rather than bleeding edge), thus, the infrequent updates to our OSS repos and forks. Short-term it may be quicker to submit a PR to to |
I've got a mostly-usable version of mink2selenium working with facebook/webdriver, although I'm not actively working on it at the moment (currently sticking with selenium 2). https://github.com/open-sausages/MinkSelenium2Driver/commits/master I gave up due to incompatibilities between selenium 3 and the geckodriver (issues with mousepointer APIs being incompatible). At my most recent commit I'd attempted to fix, but selenium still complains about unknown actions. It works fine with chrome of course. :) |
See SeleniumHQ/selenium#3382, which I believe MAY be the issue I'm struggling with. |
@stof , in past we've reviewed possibility to switch to https://github.com/facebook/php-webdriver, but blocking moment was fact, that MinkSelenium2Driver works with PHP 5.3+, but https://github.com/facebook/php-webdriver require PHP 5.6+. I think we should revisit this topic and revive any PR needing it (see #263). We can even release major version of MinkSelenium2Driver with different PHP version requirements without need to release Mink 2.0. We can create branch 1.3 branch from current |
That sounds great @aik099 |
In instaclick/php-webdriver@be87042, @robocoder added support for the changed behaviour of selenium. Is there any chance to get this into a new release of the driver soon? |
I wonder if there's a way to detect the protocol version... |
Hello, What is the current state of support for Selenium 3? We are looking for migration, but the first test (Behat 3.x / last stable version of this driver / Gecko driver 0.19 and Firefox 56) are not going well. Even the smaller case are failing (the HTML content is not found). On contrary, everything is going smoothly with Chrome. Should I expect this to work? Or I should consider the Firefox compatibility as dead? Thanks! Tony |
Firefox support seem dependant on geckodriver and selenium both updating to use the same w3c spec for webdriver. https://www.w3.org/TR/webdriver/. Someone please correct me if I'm wrong. :) I can't describe the exact incompatibilities since I've only a shallow understanding of the issues, but I know that My advice is to move to chrome in the meantime @THedoux. I expect that firefox support will be improved in the future. |
ok, thx for your feedback. |
@tractorcow @THedoux it depends what you mean by "Selenium 3 support". As of Selenium 3.5, the translation between the Selenium WebDriver protocol and the W3C WebDriver protocol is disabled by default (allowing to use clients talking the W3C protocol). As the PHP bindings are talking the Selenium protocol and geckdriver talks the W3C protocol, we need this translation layer. I tried running the Mink testsuite with Selenium 3 and geckodriver a few days ago, and most tests are green when using the master branch of the Mink Selenium2Driver (note that I'm not using the latest release, which has much more failures). But this requires running Selenium with the translation layer enabled: java -jar selenium-server-standalone-3.6.0.jar -enablePassThrough false |
@aik099 changing the WebDriver library being used would require a new major version of the driver anyway, because of the fact that we allow direct access to the WebDriver layer (in case they have to use APIs not covered by Mink, for instance handling of alerts), and this one would be incompatible when changing the library. And note that the Facebook binding does not support the W3C protocol yet either, so this would not magically solve our issues. |
+1 for Selenium 3 |
Selenium 3 is supported for drivers using the JSONWireProtocol. Support for the W3C protocol (used by the new geckodriver) is not there yet. And this has several reasons:
|
@stof does this imply a MinkSelenium3Driver is a separate concern, rather than a simple major version increment of the current module? Thanks for explaining it succinctly; It mirrors my own experience (and eventual frustration) with the compatibility switch. |
I've been trying to get our existing behat/mink/selenium tests working with selenium 3 for a few days now. Can I clarify that I have correctly understood the current state of affairs?
If this is correct - what have other people done for their test infrastructure in this area? Locked Firefox at v47? |
@mooragor I started running my tests using Chrome, as this still works. But for the long run, I'd love to not be fixed on this :( |
Supporting Selenium 3 fully is something we want to do. But using the W3C API directly to talk to the Firefox driver requires having support for it in the webdriver library we use. I know they started the work on it. I opened an issue to get details about their plan: instaclick/php-webdriver#84 |
Is there anything we can do to help with this, or to raise the priority of this? Someone we should email, or an issue to vote up or something? Any practical help we could provide? Not having Behat able to use selenium 3 is an inconvenience now, but will soon become a real problem as we get further and further behind on the versions of browsers we can automatically test. |
@mooragor using Selenium 3 with Chrome works fine. What is not working fine is running Firefox with Selenium 3, because the new geckodriver, because it does not speak the same protocol (the W3C WebDriver spec is heavily inspired by the JsonWire WebDriver protocol of Selenium, but it is not the same). Given that Selenium 3 ships with a translation layer between both protocols, I will first try to get things working when using it (I still have a few failures there). |
Will do - many thanks! |
FYI we're open to transferring |
I've looked at https://github.com/facebook/php-webdriver (if we'll switch to that) and it says: |
This commit adds the remote protocol end points and handling of commands as required by the W3C WebDriver Specification for the IE driver. It deprecates and mostly removes behavior that is at odds with the specification, but may have been the proper behavior under the open-source dialect of the protocol. Issues arising from this version of the driver that appeared to work in previous versions will only be addressed if a simple test case is provided that demonstrates it working in a prior version of the driver and failing in this one. Reported issues lacking such a test case will be summarily closed.
@aik099 , I have used the mink drivers with php 7 , seems to work the same way as it does with php 5.6 however I've only done a few dozen tests so far. |
@tractorcow Something I've found that works well in one of our client sites which we use chromedriver with selenium was to use the latest version from their servers since Travis seems to install the latest chrome if you use their Chrome addon. It tends to be more inline with the current Chrome version than those via apt-get. before_install:
- LATEST_CHROMEDRIVER=$(wget -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE)
- wget https://chromedriver.storage.googleapis.com/$LATEST_CHROMEDRIVER/chromedriver_linux64.zip
- mkdir vendor
- mkdir vendor/bin
- unzip chromedriver_linux64.zip -d vendor/bin |
Thanks @UndefinedOffset , I've been using chromedriver directly without selenium at all and have had a lot of success so far. :) Thanks for the snippet I'll definitely use it. In case anyone is interested my facebook/webdriver mink extension is at https://github.com/open-sausages/MinkFacebookWebDriver currently (forked from this repo). |
@stof the trick with |
we're sticking with older versions of selenium, it's working well. 2.5.3.1 for firefox and 3.5.3 for chrome selenium/standalone-chrome-debug:3.5.3-boron and selenium/standalone-firefox-debug:2.53.1-beryllium for IE11 we're using 3.5.0 using mink drivers
|
I created #293 to track the work on support the W3C webdriver protocol. I'm closing this issue as Selenium 3 is supported. |
Any plans for selenium 3 support?
At least from minimal testing it seems certain parts have changed:
The text was updated successfully, but these errors were encountered: