//*[@id='someid']/tr[contains(.,'somestring') and not(contains(.,'otherstring'))]
We can mix match almost any HTML elements in it, it's very readable we can describe what we want like describing something to another human being. Say, we want filled fields on a row containing the word 'Usage', this row is placed on a table with class = 'billing_table', and the table is put inside a div with id = 'counterbox'. Here's how it will look like on XPath :
//div[@id='counterbox']/table[@class='billing_table']/tr[contains(.,'Usage')]/td[not(.,contains(''))]
Have fun with XPath! ^^
No comments:
Post a Comment