Reputation: 33
I'm working in Geb and I want to be able to grab the label with text "SS". How do I do this?
The HTML file with this block in the middle and multiple others like it that I want access to:
<span>
<input id="RunTimeSecond" name="RunTimeSecond" class="element text " size="2" type="text" maxlength="2" value="00">
<label>SS</label>
</span>
Upvotes: 1
Views: 433
Reputation: 171084
You can do
$("input").next("label")
It's all in the navigation section if the Book of Geb
http://www.gebish.org/manual/current/#navigator
Upvotes: 4