Hi,
as the error message says, this xpath selects an img, not a link. You
can change the xpath to:
//tr/td/a/[EMAIL PROTECTED]'Generate Excel sheet']/..
or
//tr/td/a[img/@title='Generate Excel sheet']
to select the a element.
Marc.
Deware, Vipin (Cognizant) wrote:
Hi All,
In one of my webtest I have one problem. Actually I have to click a link
which has icon as a link. This link opens an excel file in new page.
So I have written a code to click that link. The Webtestcode is -
<clickLink
xpath="//tr/td/a/[EMAIL PROTECTED]'Generate Excel
sheet']"
description="Opens an Excel File">
But after executing webtest I got an error message -
"com.canoo.webtest.engine.StepFailedException: The xpath doesn't select
a link but a 'class com.gargoylesoftware.htmlunit.html.HtmlImage'
So I am unable to find the reason. If anyone knows solution of this kind
of error. Then please write to me.
Thanking You.
Regards,
Vipin Deware
This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on
this e-mail is strictly
prohibited and may be unlawful.
Visit us at http://www.cognizant.com
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest