Issue
This is the inspect picture of a webpage, ,
as we can see, this value:
//div[contains(text(), 'Interface Settings - wan')]/../following-sibling::div[1]/div[1]/div[4]/div/div[2]/div/div/div
is xpath-ed to the yellow-color div part. Can someone help me how to xpath to its child path area in this case ?
So far I have tried such:
//div[contains(text(), 'Interface Settings - wan')]/../following-sibling::div[1]/div[1]/div[4]/div/div[2]/div/div/div/svg/path
but it does not work for me.
Thanks,
Jack
Solution
In general svg tags can be located as:
//*[name()='svg']
or
//*[local-name()='svg']
For your specific case, you could implement the same
//div[contains(text(), 'Interface Settings - wan')]/../following-sibling::div[1]/div[1]/div[4]/div/div[2]/div/div/div//*[name()='svg']
Having said that, I would recommend you to use relative xpath
rather than absolute xpath.
Answered By - cruisepandey
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.