Skip to content Skip to sidebar Skip to footer

Xpath - Get Html Element If Its Class Contains Some Text

Can I get an element if its class contains some text? Example:
- match (header)
- match

Solution 1:

you could use contains() in your XPath predicate. like this:

div[contains(@class, 'header')]

Post a Comment for "Xpath - Get Html Element If Its Class Contains Some Text"