I am currently using the :contains pseudo element with Element click to navigate a site I am scraping. I only want to navigate to pages accessed by items that end with the term "appliance". This works:
div#react-select-2--list div.Select-option:contains("appliance")
I want to be more selective, based on what the text starts with as well as what it ends with.
A regex that would match the items I am looking to select is:
\b[A-Z]{2}-[0-9]{3}.+?appliance\b
However, I don't know if I can use a regex with Element click. Is this possible?
If not, is there another way to select elements based on the start and end of string? Or a way to select something that contains("MX-0")
AND contains("appliance")
?