How to use click with any button or any link

0 votes
I am using selenum webdriver and want to know as what is the best way of using click()?
Dec 20, 2018 in Selenium by Jino
• 5,820 points
952 views

1 answer to this question.

0 votes

I am taking an example for gmail click of login button.

You can create a webelement for the button i.e.

WebElement button1 = driver.findElement(By.className("CwaK9"));

and then click on that button.

button1.click();

The other way to do that is directly identify the element and click on it i.e.

driver.findElement(By.className("CwaK9")).click();

Hope this helps.

answered Dec 20, 2018 by Shuvodip

Related Questions In Selenium

0 votes
0 answers
0 votes
2 answers

Python & Selenium: How to find and click on YouTube's Like button

Hello Nitin, as the Like button on ...READ MORE

answered Aug 23, 2019 in Selenium by Abha
• 28,140 points
5,432 views
0 votes
2 answers

How to use Selenium with Python?

Hey Shubham, you can checkout this thread ...READ MORE

answered Aug 26, 2019 in Selenium by Abha
• 28,140 points
1,191 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
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
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,865 views
+1 vote
1 answer

How to click on Login button on facebook?

As you said, you can use the ...READ MORE

answered Dec 18, 2018 in Selenium by Nabarupa
3,270 views
+1 vote
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