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 Sahiti
• 6,370 points
806 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,460 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 30, 2018 in Selenium by Damon Salvatore
• 5,980 points
5,345 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
7,717 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, 2019 in Selenium by Anvi
• 14,150 points
12,558 views
0 votes
1 answer

How to perform right click action using Selenium Webdriver?

@Yuvika, you need to use Actions Class ...READ MORE

answered May 28, 2019 in Selenium by Reshma
1,018 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
13,649 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
9,131 views
0 votes
2 answers

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

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

answered Sep 4, 2020 in Selenium by Sri
• 3,190 points
2,883 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
7,209 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,460 points
7,359 views
0 votes
1 answer
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