MinkSelenium2Driver icon indicating copy to clipboard operation
MinkSelenium2Driver copied to clipboard

running minkselenium2 1.7 driver against selenium-Server-4.25 will not work on my local machine for debugging

Open zanderFortinbras opened this issue 1 year ago • 8 comments

zanderFortinbras avatar Oct 02 '24 14:10 zanderFortinbras

That is because this driver doesn't support the Selenium 4 server.

The 2 number in the driver name indicates that only the Selenium 2 server is supported. There is partial support for Selenium 3 (except for window opening/frames).

To use Selenium 4 server you need to use https://github.com/minkphp/webdriver-classic-driver driver (not released, but working).

aik099 avatar Oct 02 '24 14:10 aik099

what should we use in composer.json to support this new driver Have you a sample yml file for webdriver classic ?

    "behat/behat": "v3.13.0",
    "behat/mink": "v1.10.0",
    "behat/mink-extension": "2.3.1",
    "behat/mink-browserkit-driver": "<10.0.0",
    "behat/mink-selenium2-driver" : "<20.0",

zanderFortinbras avatar Oct 03 '24 15:10 zanderFortinbras

is there a basic sample project with yml and composer ?

Is it worth moving to this and then waiting for the release when we should just move to php-webdriver/webdriver

zanderFortinbras avatar Oct 03 '24 16:10 zanderFortinbras

what should we use in composer.json to support this new driver Have you a sample yml file for webdriver classic ?

    "behat/behat": "v3.13.0",
    "behat/mink": "v1.10.0",
    "behat/mink-extension": "2.3.1",
    "behat/mink-browserkit-driver": "<10.0.0",
    "behat/mink-selenium2-driver" : "<20.0",

You should:

  1. replace "behat/mink-extension": "2.3.1", with "friends-of-behat/mink-extension": "^2.5@dev" (The PR supporting that driver was just merged today;
  2. add "mink/webdriver-classic-driver": "^1.0@dev" (or maybe use "dev-master" if the proposed version won't work, because it wasn't released on Packagist)
  3. do the composer update to download new packages specified in the composer.json
  4. as for .behat.yml file you need to replace selenium2 with webdriver-classic (or webdriver_classic) and everything should continue to work (I've asked the driver developer for a sample file in https://github.com/minkphp/webdriver-classic-driver/pull/19 ).

is there a basic sample project with yml and composer ?

No sample project.

Is it worth moving to this and then waiting for the release when we should just move to php-webdriver/webdriver

The mentioned package is WebDriver (talks to Selenium only, not to Mink/Behat). The mentioned https://github.com/minkphp/webdriver-classic-driver internally uses php-webdriver/webdriver.

aik099 avatar Oct 03 '24 18:10 aik099

you need friends-of-behat/mink-extension: ^2.8@dev (the 2.8.0 release is not yet done, hence the need for @dev for now) and mink/webdriver-classic-driver: ^1.0@dev in your dependencies to use the new driver in your behat+mink setup (the deprecated behat/mink-extension package does not support the new driver)

stof avatar Oct 04 '24 07:10 stof

Thank you for help guys.

image

image

image

zanderFortinbras avatar Oct 04 '24 09:10 zanderFortinbras

@zanderFortinbras that's not the namespace of the extension class

stof avatar Oct 04 '24 09:10 stof

Thanks stof, What should it be ?

zanderFortinbras avatar Oct 04 '24 11:10 zanderFortinbras