xpath - Selenium webdriver - Java - How to get code value from tr element? -
i td code value based on td text value. please refer attached image. kindly help!!
below code didn't work
webelement test1 = driver.findelement(by.xpath("//table[@class='table table-striped-admin']//tr//td[contains(text(),'"+tag_name+"')]//td//code")); test1.gettext();
maybe this:
webelement test1 =driver.findelement(by.xpath("//table[@class='table table-striped-admin']//tr[contains(td[1],'tag name 1')]/td/code")); test1.gettext();
???
Comments
Post a Comment