Skip to content

Instantly share code, notes, and snippets.

@xabbuh
Created December 11, 2014 13:26
Show Gist options
  • Save xabbuh/24ac7a03adfe1f2bd93b to your computer and use it in GitHub Desktop.
Save xabbuh/24ac7a03adfe1f2bd93b to your computer and use it in GitHub Desktop.
.//label[contains(., 'foo')] selects the first and the third label element
<html>
<head>
<title>Test</title>
</head>
<body>
<p>Hello World</p>
<form method="post">
<label for="foo">foo</label> <input type="text" id="foo">
<label for="bar">bar</label> <input type="text" id="bar">
<label for="foobar">foobar</label> <input type="text" id="foobar">
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment