minkphp / MinkSelenium2Driver

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

Fixing build #303

Closed oleg-andreyev closed 5 years ago

oleg-andreyev commented 5 years ago

Closes #290 Closes #287

aik099 commented 5 years ago

Using Docker as the only way to run tests on Travis CI is too radical solution. Have you tried other things, like locking to other Firefox version or maybe using Google Chrome?

oleg-andreyev commented 5 years ago

@aik099 I cannot agree that Docker is a radical solution, it's a de-facto container solution, but yes I have a working solution for Google Chrome, I could apply it, but I wanted to keep as much as possible from master + @stof have a different PR for Google Chrome.

aik099 commented 5 years ago

I cannot agree that Docker is a radical solution, it's a de-facto container solution, but yes I have a working solution for Google Chrome, I could apply it, but I wanted to keep as much as possible from master + @stof have a different PR for Google Chrome.

I see, but then why this PR is needed, when you already know that #300 should fix the same thing in a different way?

oleg-andreyev commented 5 years ago

Firefox and Chrome are different browsers and MAY behave differently, in ideal I would add testing with firefox / chrome / phantomjs (not supported, but still quite popular), so Docker will be more convenient to use and also it does not cost anything to maintain Docker images.

oleg-andreyev commented 5 years ago

BTW ChomeDriver is failing with

1) Behat\Mink\Tests\Driver\Custom\TimeoutTest::testInvalidTimeoutSettingThrowsException
Failed asserting that exception of type "Exception" matches expected exception "\Behat\Mink\Exception\DriverException". Message was: "invalid argument: unknown type of timeout:invalid
  (Session info: chrome=71.0.3578.98)
  (Driver info: chromedriver=2.45.615355 (d5698f682d8b2742017df6c81e0bd8e6a3063189),platform=Mac OS X 10.14.2 x86_64)" 

This is because how instaclick/php-webdriver is handling errors

https://github.com/instaclick/php-webdriver/blob/161f35e3c45d9fb93b1171a1394f8d555aab9525/lib/WebDriver/Exception.php#L139

Chrome is returning errno 61, which is not mapped.

aik099 commented 5 years ago

Firefox and Chrome are different browsers and MAY behave differently, in ideal I would add testing with firefox / chrome / phantomjs (not supported, but still quite popular), so Docker will be more convenient to use and also it does not cost anything to maintain Docker images.

Probably. OK.

aik099 commented 5 years ago

BTW ChomeDriver is failing with

1) Behat\Mink\Tests\Driver\Custom\TimeoutTest::testInvalidTimeoutSettingThrowsException
Failed asserting that exception of type "Exception" matches expected exception "\Behat\Mink\Exception\DriverException". Message was: "invalid argument: unknown type of timeout:invalid
  (Session info: chrome=71.0.3578.98)
  (Driver info: chromedriver=2.45.615355 (d5698f682d8b2742017df6c81e0bd8e6a3063189),platform=Mac OS X 10.14.2 x86_64)" 

This is because how instaclick/php-webdriver is handling errors

https://github.com/instaclick/php-webdriver/blob/161f35e3c45d9fb93b1171a1394f8d555aab9525/lib/WebDriver/Exception.php#L139

Chrome is returning errno 61, which is not mapped.

Any way to fix this? Maybe a PR to InstaClick is needed?

oleg-andreyev commented 5 years ago

Any way to fix this? Maybe a PR to InstaClick is needed?

Without making a PR to InstaClick, impossible. As up to me, InstaClick seems as abandoned there is no activity for a year almost. Almost all issues are created by @stof or @aik099. And as I mentioned before I'd like to push forward with facebook/php-webdriver https://github.com/minkphp/MinkSelenium2Driver/pull/304 https://github.com/instaclick/php-webdriver/issues/87

oleg-andreyev commented 5 years ago

Ready. Build green. 5.3 is returned

oleg-andreyev commented 5 years ago

@stof @aik099 are there any showstopper for this being merged?

oleg-andreyev commented 5 years ago

@stof @aik099 is there anything holding us on merging this PR?

aik099 commented 5 years ago

Nothing is blocking me. I'm not sure about @stof .

oleg-andreyev commented 5 years ago

ping @stof

L0rD59 commented 5 years ago

Hi,

I have some trouble with latest release (1.3.1)

Fatal error: Uncaught WebDriver\Exception\UnknownError: Build info: version: '2.48.2', revision: '41bccdd', time: '2015-10-09 19:59:12'
System info: host: '018fc27d0330', ip: '172.31.0.9', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-45-generic', java.version: '1.8.0_45-internal'
Driver info: driver.version: unknown in /var/www/html/vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php on line 350

Call Stack:
    0.0004     362408   1. {main}() /var/www/html/vendor/behat/behat/bin/behat:0
    0.0399    2119624   2. Behat\Testwork\Cli\Application->run() /var/www/html/vendor/behat/behat/bin/behat:34

Behat\Mink\Exception\DriverException: Could not close connection in /var/www/html/vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php on line 350

Call Stack:
    0.0004     362408   1. {main}() /var/www/html/vendor/behat/behat/bin/behat:0
    0.0399    2119624   2. Behat\Testwork\Cli\Application->run() /var/www/html/vendor/behat/behat/bin/behat:34
   98.2076   17677000   3. Behat\Mink\Mink->__destruct() /var/www/html/vendor/behat/mink/src/Mink.php:0
   98.2076   17677000   4. Behat\Mink\Mink->stopSessions() /var/www/html/vendor/behat/mink/src/Mink.php:46
   98.2077   17677000   5. Behat\Mink\Session->stop() /var/www/html/vendor/behat/mink/src/Mink.php:186
   98.2077   17677000   6. Behat\Mink\Driver\Selenium2Driver->stop() /var/www/html/vendor/behat/mink/src/Session.php:78

If i use dev-master works as expected and faster

aik099 commented 5 years ago

Hi,

I have some trouble with latest release (1.3.1)

Fatal error: Uncaught WebDriver\Exception\UnknownError: Build info: version: '2.48.2', revision: '41bccdd', time: '2015-10-09 19:59:12'
System info: host: '018fc27d0330', ip: '172.31.0.9', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-45-generic', java.version: '1.8.0_45-internal'
Driver info: driver.version: unknown in /var/www/html/vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php on line 350

Call Stack:
    0.0004     362408   1. {main}() /var/www/html/vendor/behat/behat/bin/behat:0
    0.0399    2119624   2. Behat\Testwork\Cli\Application->run() /var/www/html/vendor/behat/behat/bin/behat:34

Behat\Mink\Exception\DriverException: Could not close connection in /var/www/html/vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php on line 350

Call Stack:
    0.0004     362408   1. {main}() /var/www/html/vendor/behat/behat/bin/behat:0
    0.0399    2119624   2. Behat\Testwork\Cli\Application->run() /var/www/html/vendor/behat/behat/bin/behat:34
   98.2076   17677000   3. Behat\Mink\Mink->__destruct() /var/www/html/vendor/behat/mink/src/Mink.php:0
   98.2076   17677000   4. Behat\Mink\Mink->stopSessions() /var/www/html/vendor/behat/mink/src/Mink.php:46
   98.2077   17677000   5. Behat\Mink\Session->stop() /var/www/html/vendor/behat/mink/src/Mink.php:186
   98.2077   17677000   6. Behat\Mink\Driver\Selenium2Driver->stop() /var/www/html/vendor/behat/mink/src/Session.php:78

If i use dev-master works as expected and faster

Hi, @L0rD59 . How your comment is related to changes made in this PR?

oleg-andreyev commented 5 years ago

@stof @aik099 if PR is approved can we merge it?

oleg-andreyev commented 5 years ago

@stof @aik099 I've resumed work on this branch. I've added php7.4snapshot (and build is passing) Also I've reused https://github.com/minkphp/driver-testsuite/pull/37 where 5.3 is dropped.

https://travis-ci.org/minkphp/MinkSelenium2Driver/builds/549208858

oleg-andreyev commented 5 years ago

@aik099 @stof can we make this moving?

oleg-andreyev commented 5 years ago

@aik099 build is green.

aik099 commented 5 years ago

Merging. Thanks @oleg-andreyev .