T K

T K

  • NA
  • 31
  • 5.9k

XPath query to return parent nodes and child href tags

Apr 15 2015 3:09 AM
I have the following HTML , see at the end of this question.
  1. Please suggest an XPath expression to return all the top level Parent rows only, i.e. all the tr elements ,  there should not be any tr element containing the "Child Rows"
  2. Next, I need XPATH query to return the <a href> tags. In my example, it should return the <a href> tag with "FailedStep1" text
  3. Lastly I also need an XPATH query to return read the "FailedStep1" table and return data row having "Fail" in it. Refer the "Result" column
  4. I am reading below HTML file in a winforms application. My HTML is attached with this question






Attachment: dummyhtml.zip