Web Automation Testing Using Selenium Python Part 3 alerts popups

Опубликовано: 15 Октябрь 2024
на канале: techsapphire
1,147
5

In this lecture you will learn about handling alerts using selenium automation:
Alerts are the pop up boxes, which takes you focus out of the current browser, and forces you to send the alert message.

Types of alert:
Simple alert
Confirmation alert
Prompt alert

Simple alert displays information or warning message on screen.


Confirmation alert comes with options of OK and Cancel.

user input
.send_keys()

driver.switch_to.alert()
driver.switch_to.alert.accept()
driver.switch_to.alert.dismiss()