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.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-09-16 11:00:00 +0000
Seen: 14 times
Last updated: Dec 22 '21