[Webtest] Getting an error message for "clickLink"

Deware Vipin (KSDA 341) Deware Vipin (KSDA 341)" <vipin.deware@credit-suisse.com
Wed, 25 Oct 2006 13:50:02 +0200


This is a multi-part message in MIME format.

------_=_NextPart_001_01C6F82B.B4CD0502
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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. =20
So I have written a code to click that link. The Webtestcode is -=20

	<clickLink
                        xpath=3D"//tr/td/a/img[@title=3D'Generate Excel
sheet']"
                        description=3D"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



------_=_NextPart_001_01C6F82B.B4CD0502
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7638.1">
<TITLE>Getting an error message for &quot;clickLink&quot;</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial">Hi All,</FONT>
</P>

<P><FONT COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial">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.&nbsp; </FONT></P>

<P><FONT COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial">So I have written a =
code to click that link. The Webtestcode is - </FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR=3D"#000080" =
SIZE=3D2 FACE=3D"Arial">&lt;clickLink</FONT>

<BR><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; xpath=3D&quot;//tr/td/a/img[@title=3D'Generate Excel =
sheet']&quot;</FONT>

<BR><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; description=3D&quot;Opens an Excel File&quot;&gt;</FONT>
</P>

<P><FONT COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial">But after executing =
webtest I got an error message -<B> =
&quot;com.canoo.webtest.engine.StepFailedException: The xpath doesn't =
select a link but a 'class =
com.gargoylesoftware.htmlunit.html.HtmlImage'</B></FONT></P>

<P><FONT COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial">So I am unable to =
find the reason. If anyone knows solution of this kind of error. Then =
please write to me.</FONT>

<BR><FONT COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial">Thanking You.</FONT>
</P>

<P><FONT COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial">Regards,</FONT>

<BR><FONT COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial">Vipin Deware</FONT>
</P>
<BR>

</BODY>
</HTML>
------_=_NextPart_001_01C6F82B.B4CD0502--