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

[wdspec] change test_..._closes_browsing_context #49765

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sadym-chromium
Copy link
Contributor

Classic tests. Open context with window.open to allow it to be closed by script.

Classic tests. Open context with `window.open` to allow it to be closed by script.
@sadym-chromium
Copy link
Contributor Author

@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?

Copy link
Contributor

@whimboo whimboo left a 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
Copy link
Contributor

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"]) \
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants