Skip to content

Instantly share code, notes, and snippets.

@sureshnath
Created January 27, 2018 01:49
Show Gist options
  • Save sureshnath/246af99db8b97da90b8d5d5f9f8b708d to your computer and use it in GitHub Desktop.
Save sureshnath/246af99db8b97da90b8d5d5f9f8b708d to your computer and use it in GitHub Desktop.
XPath select column1 where column2 = value2 and column3 = value3
//table/tbody/tr[
td[count(//table/thead/tr[1]/th[.="column2"]/preceding-sibling::th)+1]/./a[contains(text(),"value2")]
and
td[count(//table/thead/tr[1]/th[.="column3"]/preceding-sibling::th)+1]/./a[contains(text(),"value3")]
]
/td[count(//table/thead/tr[1]/th[.="column1"]/preceding-sibling::th)+1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment