Selenium XPath regular expression for an expression starting with certain String.

Solved 1 Answers 21 Views

I have an element on a web page where its ID is,


 As you can see, it starts with comments-task. How to write a XPath regular expression to identify that?

1 Answer

Best answer
Here is the Regular Expression. Find the path by using 'Contains' keyword

//*[contains(@id, 'comments-task')]/div/div/div[3]/div[2]/form/button
answered Sep 14 by Priyanka91 (89 points)
selected Sep 14 by SunilBhaskar