MinkSelenium2Driver icon indicating copy to clipboard operation
MinkSelenium2Driver copied to clipboard

Fixing window switching on Selenium 3

Open aik099 opened this issue 1 year ago • 2 comments

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:

  1. [fixed] switching to window by name on Selenium 3
  2. [fixed] window resizing and maximizing for a non-current window
  3. [added] closing all, but the main window during the session reset
  4. [changed] the getWindowName and getWindowNames methods 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

aik099 avatar Feb 23 '24 17:02 aik099

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.

codecov[bot] avatar Feb 23 '24 17:02 codecov[bot]

@stof , please review. Ideally please review my other PRs as well: https://github.com/minkphp/MinkSelenium2Driver/pulls/aik099 .

aik099 avatar Mar 16 '24 19:03 aik099