Fixed frame switching by name on Selenium 3
Fixes this error from the https://github.com/minkphp/MinkSelenium2Driver/pull/383:
Behat\Mink\Tests\Driver\Basic\IFrameTest::testIFrame
WebDriver\Exception\InvalidArgument: data did not match any variant of untagged enum FrameId at line 3 column 1
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'fv-az779-213', ip: '10.1.0.12', os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.0-1056-azure', java.version: '1.8.0_[29](https://github.com/minkphp/MinkSelenium2Driver/actions/runs/8015977437/job/21897049622?pr=383#step:8:30)2'
Driver info: driver.version: unknown
Implementation ported from the https://github.com/minkphp/webdriver-classic-driver.
It appears, that on Selenium 3 frame switching is possible only by index or WebElement. This PR implements the later approach. In Selenium 2 frame switching by its name/id was also supported.
Additionally, the build script was updated to run tests on Selenium 3 in addition to Selenium 2. Should I split the build script change into a separate PR?
Codecov Report
Attention: Patch coverage is 82.35294% with 3 lines in your changes are missing coverage. Please review.
Project coverage is 89.87%. Comparing base (
4ca4083) to head (900ba20).
| Files | Patch % | Lines |
|---|---|---|
| src/Selenium2Driver.php | 82.35% | 3 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #382 +/- ##
============================================
- Coverage 90.19% 89.87% -0.32%
- Complexity 168 174 +6
============================================
Files 1 1
Lines 469 484 +15
============================================
+ Hits 423 435 +12
- Misses 46 49 +3
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@stof , extract build changes into https://github.com/minkphp/MinkSelenium2Driver/pull/383 .
I've also created a PR https://github.com/instaclick/php-webdriver/pull/132 to allow WebDriver to properly convert WebElement into JSON (as it should be doing initially). When it's merged + release is made that would allow me to remove that ugly WebElement wrapping code, that surely doesn't belong to this repo at all.
@stof , please review. Ideally please review my other PRs as well: https://github.com/minkphp/MinkSelenium2Driver/pulls/aik099 .