Nov 2 · 1 min read
Hi Purvi Dholakia,
Thank you for the feedback.
I copied your html snippet from stackoverflow. Please check the below xpath.
//div[contains(@class,’l1 r1')]//*[name()=’svg’]//*[name()=’g’]//*[name()=’rect’]Few Points:
- Try to write relative xpaths rather than absolute xpaths
- Most of the time ids generated for SVG elements are dynamic, since they are generated/rendered on the fly when you expand parent elements.
