-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[🐛 Bug]: A selenium.common.exceptions.InvalidSessionIdException exception is raised when the print options are re-used from a session to another. #11093
Comments
@tvataire, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
…urn a shallow copy of it's internal data.
Yeah, looks like we're mutating the incoming payload For comparison, Ruby is making a copy first I think the right answer is to put the |
Hi,
It's in progress :)
Not sure. |
Related PR is #11096 |
I need to look closer, but as @titusfortner mentions I think we probably don't want to be mutating the edit: Thanks for the PR I will take a look as soon as possible |
yeah, I'm not a fan of objects storing internal state in a dictionary and then providing access to that dictionary in a public method. We shouldn't mutate options in the |
Yes, what do you think about the "Option 4" and implements collections.abc.Mapping ? |
…hemself but to a copy of them.
An other fix for this bug, equivalent than the one suggested by @titusfortner, can be considered. Related PR is #11121 |
#11121) * [py]: #11093 - The SessionId shouldn't be added to params themself but to a copy of them. * [py] Add an unit test to check the session id is not preserved in print options after a page is printed. * [py] Update the test_session_id_is_not_preserved_after_page_is_printed test to comply with coding conventions.
…hemself bu… (SeleniumHQ#11121) * [py]: SeleniumHQ#11093 - The SessionId shouldn't be added to params themself but to a copy of them. * [py] Add an unit test to check the session id is not preserved in print options after a page is printed. * [py] Update the test_session_id_is_not_preserved_after_page_is_printed test to comply with coding conventions.
I believe this was resolved in #11121 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What happened?
Current behavior :
Python language bindings for Selenium WebDriver raise a selenium.common.exceptions.InvalidSessionIdException exception when a PrintOptions instance is re-used by the print_page() method from a session to another.
Expected behavior :
No exception should be raised.
How can we reproduce the issue?
Relevant log output
Operating System
Debian Bullseye
Selenium version
Python 4.5.0
What are the browser(s) and version(s) where you see this issue?
Firefox 102.3.0esr (64 bits)
What are the browser driver(s) and version(s) where you see this issue?
GeckoDriver 0.31.0
Are you using Selenium Grid?
No response
The text was updated successfully, but these errors were encountered: