0

Couldn't find the answer. As normal xpath has Contains(text(), 'text'), I cannot obtain the same within css selector.

By.CSS_SELECTOR, "div.class::contains('text')"

Is there any other way to do it ?

czyngis
  • 1
  • 1

1 Answers1

0

You may want to look into sub-string matches here

So for your example, you'd be doing something like

div[class*='text']
scilence
  • 1,069
  • 1
  • 5
  • 10