-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
While handelling multiple windows, if one is closed - switching to another gives a new browser session #172
Comments
I got the same behavior if browser is crashing. I don't know exactly the reason but it's happening when i try to open new tab via link and switch to it. Selene makes a new local browser instance at this case, despite of remote driver using. Step to reproduce:
from selenium import webdriver
from selenium.webdriver import ChromeOptions
from selene.api import *
SELENOID_IP = '172.17.21.145'
options = ChromeOptions()
capabilities = {
"acceptInsecureCerts": True,
"enableVNC": True,
"enableLog": True,
"timeZone": "Europe/Moscow"
}
driver = webdriver.Remote(command_executor=f'http://{SELENOID_IP}:4444/wd/hub',
options=options,
desired_capabilities=capabilities
)
config.driver = driver
browser.open('https://python.org')
browser.should(have.url_containing('python.org'))
config.quit_driver() |
yashaka
added a commit
that referenced
this issue
May 18, 2020
…of driver creation; removed dependency on browser_name in logic of recreation of shared driver; now only shared.browser.open will recreate driver if there was a crash
yashaka
added a commit
that referenced
this issue
May 19, 2020
…then it's not mandatory to call shared.browser.open first; bumped 2.0.0a26
Should be fixed in 2.0.0a26 ;) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If selene handles multiple windows, and one of them is closed at some point (not by Selene), trying to switch to second window - will close the browser, and open a new browser session
selene==1.0.0a13
Steps to reproduce:
Actual result:
Browser_win1 closes. Opens a new browser session
Expected result:
Switching to browser_win1 and continue working
Image proof:
Before selecting an item, there are indeed two windows opened.
The text was updated successfully, but these errors were encountered: