Reputation: 1795
Can I get an element if its class contains some text?
Example:
<div class="headerbody"></div> - match (header)
<div class="headerbottom"></div> - match (header)
<dov class="text"></div> - not match (header)
Upvotes: 19
Views: 36142
Reputation: 6105
you could use contains()
in your XPath predicate. like this:
div[contains(@class, 'header')]
Upvotes: 52