Prashant Sidhpura
unread,Apr 29, 2011, 8:14:26 AM4/29/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cubictest-users
I wish to enter username and password in two textfields and click
"login" link which takes me to next page. I am using CubicTest 2.0.3
to prepare a testcase for this. I have given "auth_username" and
"auth_password" as the name of the two textfields respectively which
match with their ID in html of page. My problem is when i export this
to Selenium core test script, it gives following lines of code:
<tr>
<td class="comment" colspan="3">Typing text [TextField:
'auth_username']:</td>
</tr>
<tr>
<td>type</td>
<td>xpath=//input[@type='text' or not(@type)]</td>
<td>michael</td>
</tr>
<tr>
<td class="comment" colspan="3">Typing text [TextField:
'auth_password']:</td>
</tr>
<tr>
<td>type</td>
<td>xpath=//input[@type='text' or not(@type)]</td>
<td>michael</td>
</tr>
<tr>
<td class="comment" colspan="3">Clicking [Link: 'Login']:</td>
</tr>
<tr>
<td>click</td>
<td>xpath=//a[normalize-space(.)='Login']</td>
<td> </td>
</tr>
As you can see, the code takes same Xpath for both the textfields
which is ambigious. If you look at last bit of code, it identifies the
Login link specifically by the name i gave to the link i.e 'Login',
whereas it doesn't use 'auth_username' / 'auth_password' to identify
in their respective Xpaths.
Any ideas?
Thanks,
Prashant