-
Notifications
You must be signed in to change notification settings - Fork 1
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
[EXPERIMENTAL] Test iframe submission #450
base: sadym/testdriver-bidi
Are you sure you want to change the base?
Conversation
|
||
// Wait is required to avoid false-positive passes. | ||
// TODO: replace wait with a more efficient method. | ||
await new Promise(resolve => setTimeout(resolve, 300)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should wait come before locate_nodes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure!
promise_test(async () => { | ||
const tree = await test_driver.bidi.browsing_context.get_tree({root: window}); | ||
const iframe = tree[0].children[0]; | ||
const submit_button_selector_result = await test_driver.bidi.browsing_context.locate_nodes({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the API is nice and I like it very much that you can use window interchangeably with browsingContext
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the same approach can be used for the element itself vs it's sharedId
8b261c9
to
5e18b51
Compare
58ea4d9
to
37c9c24
Compare
extend testdriver bidi with required methods
37c9c24
to
81e3d50
Compare
This looks pretty nice to me, although it does feel like at some point we're going to want a higher level abstraction. |
Extention of web-platform-tests#44649, providing a way to automate iframe sandbox tests. This is a very draft version, and the specific API, especially of the
testdriver
is a subject to discuss. Nevertheless, this PR is intended to provide a showcase of how the testdriver BiDi can be used in cases where there is no direct access from the test file to the browsing context under the test.