Which methods which can be used to handle pop-up and alerts in Python Selenium Webdriver?

0 votes
Which methods which can be used to handle pop-up and alerts in Python Selenium Webdriver?
Jul 29 in Selenium by Kishor
16 views

1 answer to this question.

0 votes

Hey Kishor, Python Selenium webdriver provides following methods to handle pop-ups and alerts:

  1. alert_obj.accept() : This method is used to accept the Alert. 

  2. alert_obj.dismiss() – It is used to cancel the Alert.

  3. alert.send_keys() – This method allows you to enter a value in the Alert text box.

  4. alert.text() – It is used to retrieve the message included in the Alert pop-up.

answered Jul 29 by Abha
• 19,770 points

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

How to handle Pop-up in Selenium WebDriver using Java

Actually, its pretty simple. Use this code ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,070 points
3,898 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Installing Selenium Webdriver with Python package

Hey Hemant, for installing Selenium Webdriver with ...READ MORE

answered May 8 in Selenium by Anvi
• 11,890 points
111 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,070 points
432 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
781 views
0 votes
1 answer
0 votes
1 answer

How can Custom Firefox Profiles be created and used in Selenium?

Hi Vijay, to create Custom Firefox Profile ...READ MORE

answered May 24 in Selenium by Abha
• 19,770 points
31 views