0
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,

comments-task-6-59ba23e91bb06

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

1 Answer

1
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
...