Click action in Selenium WebDriver

0 votes

I want to click on the "Ok" button of an alert window using Selenium WebDriver. I tried using assertAlert or verifyAlert but it is not working out for me.

Is it possible to click the button of an alert window?

May 15, 2018 in Selenium by darklord
• 6,140 points
21 views

1 answer to this question.

0 votes

You can use the below code to click on the button in an alert window using Java:

Alert alert = driver.switchTo().alert();
answered May 15, 2018 by Meci Matt
• 9,420 points

Related Questions In Selenium

0 votes
1 answer

Double click a record in a grid using Selenium webdriver

Try Actions class to perform this Actions action ...READ MORE

answered Mar 29, 2018 in Selenium by Damon Salvatore
• 5,510 points
990 views
0 votes
1 answer

Difference between submit() vs click() in Selenium Webdriver

The submit() function is specifically for forms ...READ MORE

answered May 24, 2018 in Selenium by sniffy_god
• 780 points
1,741 views
0 votes
1 answer

How to click on Image in Selenium Webdriver?

Hello Lalit, I guess you mean to ...READ MORE

answered May 9 in Selenium by Anvi
• 12,860 points
409 views
0 votes
1 answer
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,090 points
592 views
0 votes
1 answer
0 votes
1 answer

What is the role of TestNG & JUnit frameworks in Selenium?

Well TestNG and JUnit are test frameworks ...READ MORE

answered Apr 18, 2018 in Selenium by king_kenny
• 3,650 points
266 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,130 points
901 views
0 votes
1 answer

XPath for the elements with no ID or Name in Selenium Webdriver

Use like this or similar to this: //div[@id="top-level-menu-item-3"]/div[@class="filter-label"] //div[@id="top-level-menu1"] ...READ MORE

answered Apr 17, 2018 in Selenium by Meci Matt
• 9,420 points
1,260 views
0 votes
1 answer