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

Updating test_element to correctly test for 'checked' property #9634

Merged
merged 2 commits into from Feb 22, 2018

Conversation

Projects
None yet
4 participants
@jimevans
Copy link
Contributor

jimevans commented Feb 22, 2018

No description provided.

@jimevans

This comment has been minimized.

Copy link
Contributor Author

jimevans commented Feb 22, 2018

I've changed the test to (1) correctly verify there is no "checked" attribute on the element, and to (2) correctly retrieve the "checked" property of the element.

@andreastt
Copy link
Member

andreastt left a comment

This is fine, but I wonder if you can make one additional change whilst you’re at it.

args=[element])
result = session.transport.send("GET", "session/{session_id}/element/{element_id}/property/id"
assert False == session.execute_script("return arguments[0].hasAttribute('checked')",
args=[element])

This comment has been minimized.

Copy link
@andreastt

andreastt Feb 22, 2018

Member

Can you also replace == with is and convert the args list to a tuple? This statement should read:

assert session.execute_script("return arguments[0].hasAttribute('checked')", args=(element,)) is False

This comment has been minimized.

Copy link
@jimevans

jimevans Feb 22, 2018

Author Contributor

Gladly. Done in next commit.

@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Feb 22, 2018

Build PASSED

Started: 2018-02-22 16:23:58
Finished: 2018-02-22 16:36:23

Failing Jobs

  • chrome:dev

View more information about this build on:

@andreastt andreastt merged commit 6b13681 into web-platform-tests:master Feb 22, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jimevans jimevans deleted the jimevans:get-property branch Feb 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.