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

Can accept and dismiss alerts #101

Merged
merged 1 commit into from
Nov 19, 2020
Merged

Can accept and dismiss alerts #101

merged 1 commit into from
Nov 19, 2020

Conversation

matthewmcgarvey
Copy link
Member

Fixes #67

One thing I was surprised by is that you cannot take screenshots if an alert is present. Some selenium libraries might implement functionality around taking a screenshot of the "browser" instead of just the element/window to get around this.

https://stackoverflow.com/questions/47693245/how-can-i-take-a-screenshot-of-an-alert-using-selenium-webdriver-in-ruby
https://stackoverflow.com/questions/21670361/capture-screenshot-of-alert

@@ -136,6 +136,14 @@ class LuckyFlow
URI.parse(url).path
end

def accept_alert
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between these two methods? Since this isn't a confirm() modal, what are you "accept"ing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think since it's an alert they do the same thing. If it was a confirm then it would do different things

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah. Ok

@matthewmcgarvey matthewmcgarvey merged commit 7f207c9 into master Nov 19, 2020
@matthewmcgarvey matthewmcgarvey deleted the alerts branch November 19, 2020 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add #accept_alert and #dismiss_alert to LuckyFlow
2 participants