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!!

copy tag name

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

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -