Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to deal with browser popups drop-downs and buttons using selenium web-driver?

niana sharma February 9, 2019

Hi. How can we handle these types of popups using selenium web-driver in Firefox? I need to select a value from the drop-down and click on the Allow button when it enabled.

1 answer

0 votes
Tuncay Senturk _Snapbytes_
Community Champion
February 9, 2019

Hello Niana,

After clicking the button which opens the dialogue that contains the drop-downs, you need to wait for a while to select them. You can do that by waiting a while, but I'd recommend waiting until all AJAX calls finish. 

You can check for availability by executing a javascript as below.

String script = "return typeof jQuery!='undefined'?jQuery.active:0";
Long isActive = (Long) ((JavascriptExecutor) driver).executeScript(script);

Hope it helps

Tuncay

Suggest an answer

Log in or Sign up to answer