Clicking image link which doesnt have alt text
Brought to you by:
dgan
Hi, I have a form submit like the following. I couldnt find
a way to invoke it with the available apis [its bacically
an image link without any alt text]. Please help.
Thanks in advance.
<td height="45" align="right">
<a href="login.jsp"
onClick="document.loginForm.submit(); return false; "
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage
('btn_enter.gif','','/portel/web/images/btn_enter_over.gif',
1)"><img name="btn_enter.gif" border="0"
src="/arcsight/web/images/btn_enter.gif" width="72"
height="21">
</a>
</td>
Thanks
Rajesh
Logged In: YES
user_id=902931
Try doing a content.getLink with a find on "login.jsp".
WebUnit can find and execute links on <a href tags, the text
between those tags or any other tag in between. You could
also use any other text in the image tag to execute the
surrounding link, like "btn_enter.gif".
Ex:
contentsContents.getLink("login.jsp",
WebTag.FIND_CONTAINS).click();
contentsContents.getLink("btn_enter.gif",
WebTag.FIND_CONTAINS).click();