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
16 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,400 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,490 points
809 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
• 760 points
1,429 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
• 10,830 points
90 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,050 points
280 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,590 points
193 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
641 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,400 points
993 views
0 votes
1 answer