body substribg?


Is it possible to match body with substring or id or class?


Hi there,

Did you mean substring of the id or class attribute? If so, something like this should work:

body: //div[contains(@id, 'substring') or contains(@class, 'substring')]

If you want to match an element which contains some text, you can try:

body: //div[contains(., 'some text')]

Hope that helps.