How to use regular expressions between Selenium CSS selector code?
I am having trouble using regex between the unique id of an element.
Here's the html code
<td align="left" style="vertical-align: top; "> <span class ="radiobutton" id="mainId:gen_id_12e3:radiospan1e"> <input type="radio" name="radio1" value="on" id="radio1" tabindex="0" checked> <label for="id-2024">Yes</label>
Using xpath, I used the selenium command below with (. *) Between the element id which works great.
However, I cannot do the same in CSS as they have $ for the end of the id, ^ for the start and * anywhere on the page, but I want the id that starts with mainId with some regex and ends with a unique id ...
Any help would be appreciated.
source to share