Fixing window switching on Selenium 3
Fixes this error from the https://github.com/minkphp/MinkSelenium2Driver/pull/383:
Behat\Mink\Tests\Driver\Js\WindowTest::testWindow
WebDriver\Exception\NoSuchWindow: Unable to locate window:
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'fv-az697-197', ip: '10.1.0.44', os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.0-10[56](https://github.com/minkphp/MinkSelenium2Driver/actions/runs/8015977437/job/21897049068?pr=383#step:8:57)-azure', java.version: '1.8.0_292'
Driver info: driver.version: unknown
Implementation ported from the https://github.com/minkphp/webdriver-classic-driver.
What's included:
- [fixed] switching to window by name on Selenium 3
- [fixed] window resizing and maximizing for a non-current window
- [added] closing all, but the main window during the session reset
- [changed] the
getWindowNameandgetWindowNamesmethods to return window names instead of window handles (if the name is empty, then the handle is returned)
Related issues:
- https://github.com/minkphp/driver-testsuite/issues/94
- https://github.com/minkphp/driver-testsuite/pull/96
Codecov Report
Attention: Patch coverage is 89.83051% with 6 lines in your changes missing coverage. Please review.
Project coverage is 90.52%. Comparing base (
4ca4083) to head (867a928). Report is 7 commits behind head on master.
:exclamation: Current head 867a928 differs from pull request most recent head 3749e26
Please upload reports for the commit 3749e26 to get more accurate results.
| Files | Patch % | Lines |
|---|---|---|
| src/Selenium2Driver.php | 89.83% | 6 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #384 +/- ##
============================================
+ Coverage 90.19% 90.52% +0.33%
- Complexity 168 180 +12
============================================
Files 1 1
Lines 469 517 +48
============================================
+ Hits 423 468 +45
- Misses 46 49 +3
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@stof , please review. Ideally please review my other PRs as well: https://github.com/minkphp/MinkSelenium2Driver/pulls/aik099 .