Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are no distinct self-closing tags in HTML, but assuming you mean elements with two separate tags, the XPath to locate an element within two distinct tags would be:

//tag1[@attribute='value']/tag2[@attribute='value']/element

Replace "tag1" and "tag2" with the names of the two distinct tags, "attribute" with the attribute name you want to search for and "value" with its corresponding value, and "element" with the name of the element you are trying to locate.