Locating an element by value using css selector using Selenium WebDriver

0 votes

For the below element, how can I find the value td using css selector?

<td class="someclass" colspan="3">
  unique text
</td>
Apr 9, 2018 in Selenium by DragonLord999
• 8,450 points
2,102 views

1 answer to this question.

0 votes

Below code will help

By.cssSelector("td[class='someclass'][value='unique text']");

answered Apr 9, 2018 by coldcode
• 2,090 points

Related Questions In Selenium

0 votes
1 answer

Wait for an element to be accessible using Selenium WebDriver

You can try out the below code: ...READ MORE

answered May 18, 2018 in Selenium by Atul
• 10,240 points
1,763 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Is there a way to get element by XPath using JavaScript in Selenium WebDriver?

You can use the document.evaluate: Evaluates an XPath ...READ MORE

answered Nov 27, 2020 in Selenium by Gitika
• 65,770 points
3,870 views
0 votes
1 answer

Can't find an element Using Selenium

The reason you can't locate the item ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,500 points
2,691 views
0 votes
1 answer

Select an item from a dropdown list using Selenium WebDriver

Use this then it will work - new ...READ MORE

answered Apr 9, 2018 in Selenium by Vardy
• 2,360 points
7,766 views
0 votes
1 answer

Getting CSS class name using Selenium Webdriver

You can use getAttribute(attributeLocator) function.  selenium.getAttribute(//xpath@class); You have to specify the ...READ MORE

answered Apr 9, 2018 in Selenium by ghost
• 1,790 points
1,609 views
0 votes
1 answer

Using gettext() method for the specific element using Selenium WebDriver

Mistake is that u r printing the ...READ MORE

answered Apr 10, 2018 in Selenium by Vardy
• 2,360 points
28,717 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