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

Pass \WebDriver\Element always as an object for execute #353

Merged
merged 1 commit into from
May 19, 2022

Conversation

mvorisek
Copy link
Contributor

@mvorisek mvorisek commented Apr 17, 2022

and fix Selenium v4.x support as it does not support legacy ELEMENT key.

@codecov
Copy link

codecov bot commented Apr 17, 2022

Codecov Report

Merging #353 (4ee4eca) into master (e5f8421) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             master     #353   +/-   ##
=========================================
  Coverage     90.02%   90.02%           
  Complexity      150      150           
=========================================
  Files             1        1           
  Lines           421      421           
=========================================
  Hits            379      379           
  Misses           42       42           
Impacted Files Coverage Δ
src/Selenium2Driver.php 90.02% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e5f8421...4ee4eca. Read the comment docs.

@mvorisek mvorisek changed the title Pass \WebDriver\Element always as an object Pass \WebDriver\Element always as an object for execute Apr 17, 2022
@aik099
Copy link
Member

aik099 commented Apr 27, 2022

  1. what are the benefits (or fixes) provided by this change?
  2. are all tests still pass?

@mvorisek
Copy link
Contributor Author

what are the benefits (or fixes) provided by this change?

see instaclick/php-webdriver#80, instaclick/php-webdriver@b5b18bd and spec https://w3c.github.io/webdriver/#executing-script

ELEMENT key is Selenium 2.x serialization, for Selenium 3.x it is still supported, but W3C element-6066-11e4-a52e-4f735466cecf key is recommended

for Selenium 4.x, only the later is supported

the serialization, since v1.4.14, is natively supported in instaclick/php-webdriver so this PR simplifies the code in this repo and leaves the serialization logic to the underlaying driver

2. are all tests still pass?

yes, no BC break

@aik099 aik099 merged commit 5d15043 into minkphp:master May 19, 2022
@aik099
Copy link
Member

aik099 commented May 19, 2022

Merging. Thanks @mvorisek .

@mvorisek mvorisek deleted the no_getid branch May 19, 2022 14:22
@aik099
Copy link
Member

aik099 commented Feb 17, 2024

Turns out, that without this fix attempt to use the NodeElement::getAttribute method will fail on the BrowserStack.

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.

2 participants