I’m struggling to write a xpath which will help me finding image for popup.gif above based on known td element name, such as in this case “one” and “two”.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your question could be answered better with additional context. However if you are simply looking for the image tag which links to “popup.gif” assuming there is no URL you can use a pretty simple document-wide search:
If you a fully qualified URL or a relative URL not in the same folder is used to link to “popup.gif”, and you aren’t entirely sure what the URL will be in a given environment, you can use a regular expression match on the string of the
srcattribute.To use the
nameattribute to match, you can also do path-based matches as follows:This will match the following structure.
This expression may be excessively generic, it’s highly dependent upon your document structure.