Skip to content

Fixing window switching on Selenium 3 - #384

Merged
aik099 merged 4 commits into
minkphp:masterfrom
aik099:window-test-fix
Oct 31, 2024
Merged

Fixing window switching on Selenium 3#384
aik099 merged 4 commits into
minkphp:masterfrom
aik099:window-test-fix

Conversation

@aik099

@aik099 aik099 commented Feb 23, 2024

Copy link
Copy Markdown
Member

Fixes this error from the #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:

@codecov

codecov Bot commented Feb 23, 2024

Copy link
Copy Markdown

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.

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 ⚠️
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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aik099 aik099 changed the title Fixing window switching test Fixing window switching on Selenium 3 Feb 24, 2024
Comment thread src/Selenium2Driver.php
Comment thread src/Selenium2Driver.php
@aik099
aik099 force-pushed the window-test-fix branch 2 times, most recently from ec98133 to 0ed565f Compare March 11, 2024 18:53
@aik099
aik099 requested a review from stof March 16, 2024 19:46
@aik099

aik099 commented Mar 16, 2024

Copy link
Copy Markdown
Member Author

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

@aik099
aik099 force-pushed the window-test-fix branch 2 times, most recently from 9903ccc to 2a85993 Compare April 10, 2024 07:44
@aik099
aik099 merged commit a1091b5 into minkphp:master Oct 31, 2024
@aik099
aik099 deleted the window-test-fix branch October 31, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants