-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[wdspec] change test_..._closes_browsing_context #49765
base: master
Are you sure you want to change the base?
[wdspec] change test_..._closes_browsing_context #49765
Conversation
Classic tests. Open context with `window.open` to allow it to be closed by script.
@whimboo it looks like this functionality does not work properly on ChromeDriver Classic, so I cannot verify if the test actually works. Could you please confirm it works for Firefox? |
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.
Sorry for the delay. I commented yesterday but forgot to actually submit the comments.
|
||
# Open a new window. | ||
resp = session.execute_script(f"return window.open('{url}')") | ||
new_window_handle = resp.id |
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.
What is response id? It's most likely not a webdriver specific window handle but just the id of the opened window. So it cannot be referenced for setting the window handle below.
You will have to check all the open window handles and find the one that was not open before. Most likely some tests might already do that.
with pytest.raises(NoSuchWindowException): | ||
key_chain.key_down("w") \ | ||
.pause(100 * configuration["timeout_multiplier"]) \ | ||
.pause(250 * configuration["timeout_multiplier"]) \ |
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.
Is there a reason why you increase the timeout? We had to do it in bidi due to an issue in Firefox that I'm going to fix soon.
Classic tests. Open context with
window.open
to allow it to be closed by script.