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
New driver instance starts when trying to switch to alert #117
Comments
Hi, can you please check the same case for raw selenium?
I am curious where the real problem lies...
…On Sat, Mar 25, 2017, 4:46 AM zaitsevmaxim80 ***@***.***> wrote:
Hi all!
I am using pre-release version of selene: 1.0.0.a10
I got an error when i was trying to switch to alert.
Here is a script to reproduce:
`
from selene.browser import driver, visit
from selene.support.jquery_style_selectors import s
from selene import config
from selene.browsers import Browser
config.browser_name = Browser.CHROME
visit('http://javascript.ru/alert')
s('input[value="Запустить"]').click()
alert = driver().switch_to.alert # Current driver instance has been closed
and new driver instance is starting
alert.accept()
so we get an exception at the last step selenium.common.exceptions.NoAlertPresentException:
Message: no alert open
`
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#117>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB3sntOznYMpncUu5EsXcQDv4Mq1JVXjks5rpMZDgaJpZM4MpAAg>
.
|
Hmmm, it's veeery interesting, probably we should add unit test for this. |
We should:) But I am interested whether the raw selenium will work in this
case:) It may also fail... :)
сб, 25 бер. 2017 о 17:06 Serhii Pirohov <notifications@github.com> пише:
… Hmmm, it's veeery interesting, probably we should add unit test for this.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#117 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB3snkLlwSmUMW3UcJOH-9iIbljjAeZwks5rpS1ggaJpZM4MpAAg>
.
|
The same case for raw selenium is OK, no errors: ` driver = webdriver.Chrome(executable_path=r"C:\_Tools\chromedriver.exe") |
ok, great:-) Let's fix Selene then:-)
…On Sat, Mar 25, 2017, 1:06 PM zaitsevmaxim80 ***@***.***> wrote:
The same case for raw selenium is OK, no errors:
`
from selenium import webdriver
driver = webdriver.Chrome(executable_path=r"C:\_Tools\chromedriver.exe")
driver.get('http://javascript.ru/alert')
driver.find_element_by_css_selector('input[value="Запустить"]').click()
alert = driver.switch_to.alert
alert.accept()
`
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#117 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB3snpyIq6m0hsMk7OYzl9J0XwFsdHpcks5rpTuTgaJpZM4MpAAg>
.
|
@zaitsevmaxim80 could you please clarify which python version do you use? Seems this problem relates to v2 vs v3 string unicode =( |
I am using |
Thank you. I already identified the problem. |
Fixed by #118 |
Hi all!
I am using pre-release version of selene: 1.0.0.a10
I got an error when i was trying to switch to alert.
Here is a script to reproduce:
`
from selene.browser import driver, visit
from selene.support.jquery_style_selectors import s
from selene import config
from selene.browsers import Browser
config.browser_name = Browser.CHROME
visit('http://javascript.ru/alert')
s('input[value="Запустить"]').click()
alert = driver().switch_to.alert # Current driver instance has been closed and new driver instance is starting
alert.accept() # so we get an exception at the last step: selenium.common.exceptions.NoAlertPresentException: Message: no alert open
`
The text was updated successfully, but these errors were encountered: