SyntaxFix
Write A Post
Hire A Developer
Questions
If you're using Selenium with Firefox you should be able to use EXSLT extensions, and regexp:test()
Does this work for you?
String expr = "//*[regexp:test(@id, 'sometext[0-9]+_text')]"; driver.findElement(By.xpath(expr));