Xpath query how to write?

Dear arcane, Hello.
Need your advice.
You have the following html markup of the document:
<html>
the <head> </head>

the <body>
<div id="div1" class="div">Div1</div>
<div id="div2" class="div">Div2</div>
</body>
</html>

You need to write an xpath query that will find all elements that have class = 'div' and the text contains the string 'Div'. How would I do that, please tell me?
April 4th 20 at 12:55
1 answer
April 4th 20 at 12:57
//div[@class='div' and contains(., 'Div')]

Find more questions by tags HTMLXPath