How to locate an element by tagname?

0 votes
I have heard using locators we can locate elements by name, id and also by tag name. I got it regarding name and id. Could you help me with tagname?
Jan 17 in Selenium by Neha
• 6,140 points
36 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

TagName can be used with Group elements like , Select and check-boxes / dropdowns.
below is the example code:

Select select = new Select(driver.findElement(By.tagName("select")));
select.selectByVisibleText("Nov");
or
select.selectByValue("11");
answered Jan 17 by Frankie
• 9,570 points

Related Questions In Selenium

0 votes
1 answer

How to use JavaScript in selenium to click an Element?

Executing a click via JavaScript has some ...READ MORE

answered Apr 13, 2018 in Selenium by Shubham
• 12,230 points
7,616 views
0 votes
1 answer

How to select an Object by its class in Selenium?

When it comes to Selenium, XPath will ...READ MORE

answered Apr 13, 2018 in Selenium by king_kenny
• 3,590 points
21 views
0 votes
1 answer
0 votes
1 answer

How to get the XPath of an element?

To get the xpath of an element ...READ MORE

answered Dec 19, 2018 in Selenium by Nabarupa
16 views
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,030 points
66 views
0 votes
1 answer
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
438 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
52 views
0 votes
1 answer

How to Install XPath Helper Plugin for Chrome Browser?

1) Go to https://chrome.google.com/webstore/detail/xpath-helper/hgimnogjllphhhkhlmebbmlgjoejdpjl?hl=en 2) Click on Add to Chrome. 3) ...READ MORE

answered Jan 17 in Selenium by Frankie
• 9,570 points
94 views
0 votes
2 answers

How to use XPath Helper Tool?

How to Install XPath Helper Plugin for ...READ MORE

answered Apr 27 in Selenium by Ajay
84 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.