minkphp / MinkSelenium2Driver

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

Impossible to get the result of Selenium #310

Closed bourbasquet-k closed 5 years ago

bourbasquet-k commented 5 years ago

Hi,

I have an error when I try to execute my Behat's tests with Selenium2Driver, but when I try with Goutte, it work.

I had try to :

I can see the browser open when I launch Behat, print the DOM and take a screenshot of the page but after few seconds an error appears.

In this screen we can see first, Behat with the error and in a second part, when I use Behat with Goutte.

2019_07_04_12_26_42_MINGW64_c_projects_osiris

This is the error with verbose option on Behat.

2019_07_04_14_43_26_MINGW64_c_projects_osiris

aik099 commented 5 years ago

As I can see from 1st image you're checking HTTP status code of the opened page. Unfortunately Selenium (and thus Selenium2 driver) doesn't support that, because it emulates real user actions and real user can't ask for an HTTP response code.

bourbasquet-k commented 5 years ago

Thanks for the realy quick response and sorry because I have resolved my issues. Unfortunately, I don't know how I solved my problem... About your response, I saw this impossibilities in other similar subject, but I have the same problem with another test without any HTTP status :

Scenario: check if dashboard is up Given I am on the homepage Then I should see "Login to Your Account"