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

browser.get_alert() does not return "None" when there is no alert #387

Closed
njbennett opened this issue Apr 6, 2015 · 2 comments
Closed
Assignees
Milestone

Comments

@njbennett
Copy link

When I call browser.get_alert() on a page without an alert, instead of None, it returns NoAlertPresentException: Message: No alert is present-- contrary to the documentation.

Ie.,

from splinter import Browser

browser = Browser()
browser.visit('https://www.google.com')
browser.get_alert()

It'd be nice for this to work as documented, since then I'd have a simple way to check that there isn't an active alert on the page, although it's not a huge problem.

Is the problem with the code, or with the documentation? It looks like .get_alert() is using a deprecated Selenium method, though I'm not sure if that's the cause of the issue or not.

@andrewsmedina andrewsmedina added this to the 1.0 milestone Aug 27, 2018
@andrewsmedina andrewsmedina self-assigned this Nov 16, 2018
@haoflynet
Copy link

Now I get selenium.common.exceptions.TimeoutException: Message:

@kjkorhonen
Copy link
Contributor

@andrewsmedina, I think this issue can be closed now?

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

No branches or pull requests

4 participants