For the following element, how to find it by the value of the td using css selector? In this case it\'s \"unique text\"
-
You can locate the WebElement either using dynamic xpath or dynamic css
css-
WebElement css = driver.findElement(By.cssSelector("td#someclass"));
xpath-
WebElement xpath = driver.findElement(By.xpath("//td[text,'unique text']"));
- 热议问题