vision2
vision2

Reputation: 33

in geb how to get the label after input

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

Answers (1)

tim_yates
tim_yates

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

Related Questions