html - How to validate a text in disabled field [Geb]? -
i have ui form have first select username field (ex: product) , if click on submit button popup window populates hidden field id , display field username (product).
the display field set disabled="disabled" force user use popup , not type value in field.how validate below using geb spoc?
<td class="data" style="white-space:pre"> <input id="amazon" class="formelement" name="amazon" size="20" role="textbox" disabled="disabled" type="text"> </td>
i have tried below page objects , spec test page:
selectuser {$("#amazon")}
spec:
assert selectuser.text() == "product"
any ideas?
you want use value()
method because you're accessing value of input , not text()
method not after inner text of input element.
Comments
Post a Comment