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, 2019 in Selenium by Kishor
717 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, 2019 by Abha
• 28,140 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 6, 2018 in Selenium by nsv999
• 5,500 points
10,236 views
0 votes
2 answers

What are the wait methods which can be used to handle AJAX calls?

Hi , for Ajax call better to use Explicit ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
1,246 views
0 votes
1 answer

Installing Selenium Webdriver with Python package

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

answered May 8, 2019 in Selenium by Anvi
• 14,150 points
15,183 views
0 votes
2 answers

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,500 points
12,711 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
8,608 views
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,910 points
6,680 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, 2019 in Selenium by Abha
• 28,140 points
952 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP