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

Automate tap action on an element in an iframe #17260

Merged
merged 61 commits into from
Jul 8, 2019
Merged

Conversation

LanWei22
Copy link
Contributor

First find the iframe that contains the element, and switch to that iframe, and then find the coordinated of that element in the iframe.

@wpt-pr-bot wpt-pr-bot requested a review from jgraham June 10, 2019 20:42
@LanWei22
Copy link
Contributor Author

jgraham@ when I tried to run this test, I got an error,
ERROR [expected OK] /pointerevents/pointerevent_attributes_nohover_pointers.html
└ → javascript error: window.__wptrunner_process_next_event is not a function
I saw someone else also had the same problem, I am just wondering if it is fixed or not.

@jgraham
Copy link
Contributor

jgraham commented Jun 11, 2019

So, there seems to be something wrong with this PR; it looks like you're adding files rather than updating them.

The window.__wptrunner_process_next_event error comes from the fact that in order to spin the event loop driving the tests we need to execute script in the top level window. So you need to ensure that the WebDriver window is set to the top level window whenever we try to do that.

@wpt-pr-bot wpt-pr-bot added the wptrunner The automated test runner, commonly called through ./wpt run label Jun 11, 2019
@LanWei22
Copy link
Contributor Author

jgraham@ could you please take a look, thank you.

@LanWei22
Copy link
Contributor Author

jgraham@ is it possible to add platform condition in .ini file, I tired platform=='', it does not work?

@LanWei22 LanWei22 requested a review from NavidZ June 17, 2019 16:07
@LanWei22
Copy link
Contributor Author

Navid, could you please take a look, thank you?

Copy link
Member

@NavidZ NavidZ left a comment

Choose a reason for hiding this comment

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

Would this code work if in the same sequence we have a target in iframe1 and another target in iframe2? It doesn't seem it does but maybe just add a comment in terms of what it can and cannot do. We can always improve it later as this is already an improvement to the current state.

@@ -6,4 +6,5 @@
[TestDriver actions: actions with key pressed]
expected:
if product == "firefox": FAIL
if os == "mac": FAIL
Copy link
Member

Choose a reason for hiding this comment

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

Should this be specific to chrome? If not any reason it fails for all browsers on mac?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It fails on mac for chrome .

tools/wptrunner/wptrunner/testdriver-extra.js Show resolved Hide resolved
@LanWei22
Copy link
Contributor Author

NavidZ@ Navid, please take a look, thank you.

@LanWei22
Copy link
Contributor Author

@gsnedders, @jgraham, @jugglinmike could you please take a look, thank you.

@jugglinmike jugglinmike removed their request for review June 21, 2019 19:01
@jugglinmike
Copy link
Contributor

Please let us know when this is ready for review

@LanWei22
Copy link
Contributor Author

@gsnedders, @jgraham, @jugglinmike now all the checks are passed, please take a look.

@LanWei22
Copy link
Contributor Author

@gsnedders, @jgraham, @jugglinmike could you please take a look, thank you.

@foolip
Copy link
Member

foolip commented Jun 26, 2019

@LukeZielinski can you take over this review?

@LanWei22 LanWei22 requested a review from LukeZielinski June 26, 2019 17:26
@LanWei22
Copy link
Contributor Author

@LukeZielinski please take a look, thank you.

tools/webdriver/webdriver/client.py Outdated Show resolved Hide resolved
@lukebjerring
Copy link
Contributor

lukebjerring commented Jul 2, 2019

Failure of cgi.escape is deprecated, use html.escape instead is not related to this change. Merging.
Disregard.

@LukeZielinski
Copy link
Contributor

These errors don't seem related to the change, will rebase and retry, see if that helps

@LukeZielinski
Copy link
Contributor

Still seeing the python3.7 tox errors, which are clearly unrelated to this change. Py3.7 runs seem to have been introduced recently and has its own problems. There is an expectation problem in elementPosition test on MacOs, which should be addressed in #17670
Otherwise, this PR looks ok, should be safe to force merge.

@Hexcles Hexcles merged commit a9d6d1b into master Jul 8, 2019
@Hexcles Hexcles deleted the SummerLW-patch-1 branch July 8, 2019 16:40
jgraham pushed a commit that referenced this pull request Jul 10, 2019
A large number of tests in webdriver directory are currently failing,
due to a change in the parameters of Find.css method by PR #17260,
which broke any tests that still supply the old parameters.

This commit changes the parameter order and uses default parameter value
to make the parameter list compatible with the old one.
natechapin pushed a commit to natechapin/wpt that referenced this pull request Aug 23, 2019
natechapin pushed a commit to natechapin/wpt that referenced this pull request Aug 23, 2019
A large number of tests in webdriver directory are currently failing,
due to a change in the parameters of Find.css method by PR web-platform-tests#17260,
which broke any tests that still supply the old parameters.

This commit changes the parameter order and uses default parameter value
to make the parameter list compatible with the old one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra webdriver wg-testing_browser wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants