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,380 points
146 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,020 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
154 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Can't find an element Using Selenium

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

answered Mar 26, 2018 in Selenium by nsv999
• 5,110 points
364 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,270 points
2,638 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
157 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,270 points
7,402 views
0 votes
1 answer
0 votes
1 answer