Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing window switching on Selenium 3 #384

Merged
merged 4 commits into from
Oct 31, 2024
Merged

Conversation

aik099
Copy link
Member

@aik099 aik099 commented Feb 23, 2024

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:

Copy link

codecov bot commented Feb 23, 2024

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
@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
Copy link
Member Author

aik099 commented Mar 16, 2024

@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
2 of 9 checks passed
@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