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

Add get_property #134

Merged
merged 1 commit into from
Aug 11, 2021
Merged

Add get_property #134

merged 1 commit into from
Aug 11, 2021

Conversation

TheInvisibleRabbit
Copy link
Contributor

Chromedriver versions 91+ in non w3c mode get_attribute no longer
returns properties first before trying attributes.

Chromedriver versions 91+ in non w3c mode get_attribute no longer
returns properties first before trying attributes.
@dimaqq
Copy link
Contributor

dimaqq commented Aug 10, 2021

Nice!
Out of curiosity, where can I read about "w3c" and "non-w3c" Chrome modes?

Copy link
Contributor

@dimaqq dimaqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the new method needs to be exercised in test_real_browsers given that the PR description mentioned "non-w3c" mode... in other words I wonder if this functionality is supported by other browsers.

@phyrwork
Copy link
Contributor

I'm struggling to find any "official" documentation about Chrome w3c mode.

Seems to be enabled/disabled through chromeOptions: https://bugs.chromium.org/p/chromium/issues/detail?id=1205107#c75.

I suspect that since chromedriver 91 w3c=true is the default as this is when get_attribute stopped returning properties.

Chrome webdriver implementation status available at https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/chromedriver_status.md - shows GET .../{element}/property/{name} is implemented but doesn't state what version from.

https://github.com/w3c/webdriver/ lists links to webdriver implementation status for various vendors. Not sure it's Arsenic's responsibility to know whether X webdriver implementation supports Y version of webdriver API.

User-selected webdriver either supports GET ../{element}/property/{name} or not - user shouldn't use get_property unless they think it's going to work with their selected webdriver.

@dimaqq
Copy link
Contributor

dimaqq commented Aug 11, 2021

Which version of chomedriver to use: https://chromedriver.chromium.org/downloads/version-selection
I think, we can recommend to match the chromedriver version to chrome... at least in general.
Looks like today the latest is LATEST_RELEASE_93.0.4577

According to https://bugs.chromium.org/p/chromium/issues/detail?id=1205107#c91 the change was done between versions 90 and 91.

Background on the change: https://bugs.chromium.org/p/chromium/issues/detail?id=1205107#c25

The fist of the change appears to be:

  • before, called JWP mode
    • get named attribute
    • failing that, get named property
  • after, called W3C mode
    • get named attribute

@dimaqq dimaqq merged commit 7d389f5 into HENNGE:main Aug 11, 2021
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.

None yet

3 participants