minkphp / MinkSelenium2Driver

Selenium2 (webdriver) driver for Mink framework
MIT License
508 stars 163 forks source link

Version Compatibility failed with docker selenium/standalone-chrome-debug >3.14 #308

Open nicodmf opened 5 years ago

nicodmf commented 5 years ago

After many tests, i had to downgrade my selenium container from latest to 3.14.

The behavior is that return from webdriver seems to have change and result from selenium queries are not any more recognized by the library. Maybe it not related to this package but more to instaclick as the problem occurs here : https://github.com/instaclick/php-webdriver/blob/master/lib/WebDriver/Container.php#L126.

The problem : no element is recognized on the page even if the print output is good and show the element searched.

ghost commented 5 years ago

I have the same issue. The problem is that the new version of the Selenium server returns the result for an element query as follows: [ "value" => [ "element-6066-11e4-a52e-4f735466cecf" => "/* element name */" ]]

However, the currently required version of php-webdriver expect this: [ "value" => [ "ELEMENT" => "/* element name */" ]]

This problem is fixed in the newest RC (2.0.0-RC2) of php-webdriver (see diff here: https://github.com/instaclick/php-webdriver/compare/1.4.5...master#diff-ce02647bbd4ed89bbd6d8ae91a65a6a8 )

One possible solution would be to require 2.0.0-RC2 of instaclick/php-webdriver instead of the current constraint of ~1.1. I have implemented this as a workaround here: https://github.com/XITASO/MinkSelenium2Driver


While this is not fixed in the package, use the following entries in composer.json to get it working:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/XITASO/MinkSelenium2Driver"
        }
    ],
    "require-dev": {
        "xitaso/mink-selenium2-driver": "dev-master#e262c9f1cf18d69bf52fe79c8d794e5cdd1705f8",
        "instaclick/php-webdriver": "~2.0@RC"
    }
}

Alternatively, disable the w3c capability for the Chrome driver. See e.g. https://github.com/minkphp/MinkSelenium2Driver/issues/293#issuecomment-499458269

sicaboy commented 5 years ago

I'm curious if this repo is still live?

aik099 commented 5 years ago

It is alive @sicaboy . As a maintainer I review PRs, but IMO for PR to be merged it needs to be reviewed by 2 maintainers at least.

At present time https://github.com/instaclick/php-webdriver package has 2.0.0-RC3 version released. Proposed course of action is to wait for a stable release and update dependency to that version.

stof commented 5 years ago

migrating to v2 of the instaclick webdriver library won't help us. Their W3C implementation is incomplete and buggy, and so unusable for us (see https://github.com/instaclick/php-webdriver/issues?utf8=%E2%9C%93&q=is%3Aissue+W3C+author%3Astof).

A separate discussion involves writing a new driver framework facebook/webdriver, which is much more active. But even that won't help us yet because the implementation of the W3C protocol is not merged yet (but it is working, and deals with abstracting the difference between both protocols when possible instead of forcing Mink to do the same work).