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
Fix for #1333 | Python alert automation #1470
base: trunk
Are you sure you want to change the base?
Conversation
👷 Deploy request for selenium-dev pending review.Visit the deploys page to approve it
|
First, thanks for the PR. The intention of the code here is not to thoroughly test a page, but to provide examples that can be displayed here: https://www.selenium.dev/documentation/webdriver/interactions/alerts/#alerts So we only need 3 working examples that we can link to, and they should be complete examples instead of abstracting out the common pieces. The point is to look at the complete method. Finally, I'm confused about the sleeps. We shouldn't need to hard code sleeps. Is the Python Selenium code not doing what we expect it to? |
Sure, I can update the PR. How about 3 examples, like this one ( I used this Alert example ) # Click the link to activate the alert
driver.find_element(By.ID, "alert").click()
# Store the alert in a variable
alert = driver.switch_to.alert
# Store the alert text in a variable
text = alert.text
#assert alert text
assert alert.text == "cheese"
# Press the OK button
alert.accept() On
It was the Alert pop up from browser that was taking time when I was hitting all the alert links. If I am putting 3 basic examples, hardcoded sleep is not required and works fine. |
Done ✅ |
That test gets fixed by #1472 |
But also, we want to run these with pytest in our CI, so we want to put these into their own test methods. |
and replace it with this:
If you want to discuss or collaborate, come find us in the #selneium-docs channel in the chat room: https://www.selenium.dev/support/#ChatRoom |
Description
This PR fixes issue #1333
Motivation and Context
Bug fix and contribution to Selenium community 🎉
Types of changes
Checklist