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
Apr 9, 2018 in Selenium by DragonLord999
• 8,360 points

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

Below code will help

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

answered Apr 9, 2018 by coldcode
• 1,980 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,200 points
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,030 points
0 votes
1 answer
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
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,280 points
0 votes
1 answer
0 votes
1 answer
+4 votes
3 answers

Verifying whether an element present or visible in selenium Webdriver

Below code will help you: To check Element ...READ MORE

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

findElement(By.xpath()) not working using Selenium WebDriver

element = findElement(By.xpath("//*[@test-id='test-username']"); element = findElement(By.xpath("//input[@test-id='test-username']"); (*) - any ...READ MORE

answered Apr 18, 2018 in Selenium by code_ninja
• 5,750 points

© 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.