I am trying to select a checkbox from table td element, but Selenium is not finding the element, this is my xpath locator "//*/td/a[contains(.,'Samsung Galaxy Note 10.1')]//parent::td[last()]/input[@type='checkbox']". I need to click on input filed with type checkbox, depending on the text in the with the Galaxy text.
>Solution :
You can use this xpath
//a[contains(text(),'Samsung GALAXY Note 10.1')]/../following-sibling::td[last()]//input[@type='checkbox']
You are looking for Samsung Galaxy Note 10.1, instead, it is Samsung GALAXY Note 10.1
if this is unique //a[contains(text(),'Samsung GALAXY Note 10.1')] then the XPath provided by me should work.
