Hint text testing using selenium IDE -
i learning selenium ide.
for learning , testing, have chosen popular social wbsite's 'sign up' page.
on page can see several textfields hint text.(e.g : first name).
i want assert/verify text if 'present or not' in perticular text field.
for have written following script:
asserttextpresent | //*[@id='.....'] | first name asserttext | //*[@id='.....'] | first name verifytextpresent | //*[@id='.....'] | first name verifytext | //*[@id='.....'] | first name
but every time when execute script, result :
[info] executing: |asserttextpresent | //*[@id='u_0_1'] | first name | [error] false [info] executing: |asserttext | //*[@id='u_0_1'] | first name | [error] actual value '' did not match 'first name' [info] executing: |verifytextpresent | //*[@id='u_0_1'] | first name | [info] executing: |verifytext | //*[@id='u_0_1'] | first name |
so can suggest me correct script testing 'hint text' ?
you need find element hint text defined in. example, search field on site has hint text of 'search', , code is:
<form id="search" autocomplete="off" method="get" action="/search"> <input type="text" maxlength="240" autocomplete="off" tabindex="1" value="" placeholder="search" name="q" style="display: inline-block; width: 188px; max-width: 188px;"> </form>
so it's 'placeholder' attribute contains text, can is:
<tr> <td>verifyattribute</td> <td>name=q@placeholder</td> <td>search</td> </tr>
you need substitute locator/attribute name in target field you're testing, , value should be.