Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
1.7k views
by Expert (572 points)
edited by
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 like 0 dislike
by Contributing Tester (91 points)
selected by
 
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


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...