Handle web-based popups

0 votes
There are pop-ups that disturb the script I wrote to automate a task using selenium. Are there ways to handle these pop-ups? I am new to selenium and have just started working with it. Can someone help?
Jan 7 in Selenium by Anjali
• 2,910 points
35 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

This happens with me also. I did find the solution though.

There are four methods of the effective Web-based pop-up handling:

  • string getText() method returns the text displayed on the alert box
  • void accept() method clicks on the “Ok” button as soon as the pop-up window appears
  • void dismiss() method clicks on the “Cancel” button as soon as the pop-up window appears
  • void sendKeys(String stringToSend) method enters the specified string pattern into the alert box
Hope it helps.
answered Jan 7 by Fuji
So technically what is the solutoin. what steps do we have to do now?

Related Questions In Selenium

0 votes
1 answer

How to handle drop downs using Selenium WebDriver in Java

First, find an XPath which will return ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,030 points
1,223 views
0 votes
1 answer

Web-scraping with beautifulsoup in different siblings

The tags are not closed in your ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,030 points
124 views
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,030 points
2,256 views
0 votes
1 answer

I need to find a web element using CSS

The element should be located with any ...READ MORE

answered Apr 12, 2018 in Selenium by nsv999
• 5,030 points
18 views
0 votes
1 answer

Selenium Alternatives: Is there a tool like Selenium for testing web pages but which does not involve coding.

I'm guessing you've tried Selenium IDE already. ...READ MORE

answered Apr 13, 2018 in Selenium by king_kenny
• 3,590 points
43 views
0 votes
1 answer

How to Create Object Repository in Selenium Web Driver?

Try POM Model (Page object model). Refer ...READ MORE

answered Apr 17, 2018 in Selenium by adam
361 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,030 points
66 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
438 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
52 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.