When attempting to create a basic HTML layout, I encountered some challenges.
<html>
<head>
<title>Simple Site</title>
</head>
<body>
<form>
<label>Name:</label><input type="text"></form><br/>
<label>Phone:</label><input type="text">
</form>
<div>happy</div>
<div>angry</div>
<div>sad</div>
</body>
</html>
I made several attempts to target a specific div element based on its text content but all failed.
div[@text='happy'] #nope
html body div[@text='angry'] #nope
html body div:contains('angry') #nope
html body div[text='angry'] #nope
What am I overlooking?