I need to find every HTML div which class starts with mod mod-article-tile mod-article-tile--tertiary
. I found various explanations for XPath Contains, and can't seem to figure it out. Here is an example:
My code that finds only the divs with this exact class (tested and works): '//*[@class="mod mod-article-tile mod-article-tile--tertiary"]/@id'
What I think was my closest guess: '//*contains(@class, "mod mod-article-tile mod-article-tile--tertiary")/@id'
If anyone could explain why it doesn't work and how I can fix it, that'd be great. XPath is still pretty confusing with the whole symbol syntax.