minkphp / MinkSelenium2Driver

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

Unify `browserName` given through different sources #390

Closed aik099 closed 3 months ago

aik099 commented 6 months ago

The browser name can be specified through these places:

Both browser names have no relation to each other which can lead to inconsistent driver configuration, e.g. $this->browserName set to the chrome, but in $this->desiredCapabilties['browserName'] set to the firefox.

P.S. Nobody was noticing any bugs, because the \WebDriver\WebDriver::session method (a dependency of this project) has a polyfill code, that does the same thing as this PR.

The above-mentioned polyfill code is removed in 2.x releases of the WebDriver, which allowed us to spot this problem.

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.21%. Comparing base (a3a5370) to head (a6cfcfa).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #390 +/- ## ============================================ + Coverage 90.19% 90.21% +0.02% Complexity 168 168 ============================================ Files 1 1 Lines 469 470 +1 ============================================ + Hits 423 424 +1 Misses 46 46 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

aik099 commented 3 months ago

Thank you, @stof .