You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I quit my current driver using browser.quit().
Then, I create a new driver and set it, which runs the following method:
@driver.setter
def driver(self, value: WebDriver):
stored = self._source.value
is_another_driver = on_error_return_false(lambda: value.session_id != stored.session_id)
if is_another_driver:
stored.quit() # todo: can quit raise exception? handle then...
self._source.put(value)
self.browser_name = value and value.name # overwrites default browser_name
The problem is, that the quit() method doesn't remove the driver object, and thus the session id will differ. Because of this, is_another_driver will be True and thus stored.quit() will fail throwing a selenium.common.exceptions.WebDriverException: Message: Session timed out or not found.
Suggested fix:
Either change the condition for is_another_driver or make quit() nullify the session_id.
The text was updated successfully, but these errors were encountered:
Wow! Thank you for the issue and the fix suggestion. Please monkey patch selene in your code with a fix, you already know. And I fix it in the next version. Will try to do this asap in nearest days!
I think setting the _source of SharedConfig to None is the best way to solve this because otherwise, it would point to an old source. I opened a PR with my suggestion.
On Thu, Mar 19, 2020, 18:12 Simon ***@***.***> wrote:
I think setting the _source of SharedConfig to None is the best way to
solve this because otherwise, it would point to an old source. I opened a
PR with my suggestion.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#206 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAO6ZHUY4PA3XL6AQ3ECBCLRII77HANCNFSM4LPGE7LA>
.
Selene version: 2.0.0a21
I quit my current driver using
browser.quit()
.Then, I create a new driver and set it, which runs the following method:
The problem is, that the quit() method doesn't remove the driver object, and thus the session id will differ. Because of this,
is_another_driver
will beTrue
and thusstored.quit()
will fail throwing aselenium.common.exceptions.WebDriverException: Message: Session timed out or not found
.Suggested fix:
Either change the condition for
is_another_driver
or makequit()
nullify thesession_id
.The text was updated successfully, but these errors were encountered: