[Webtest] jquery apend is not working from included javascript file

janardhan ch janardhan ch <janardhan0678@gmail.com>
Wed, 30 Jan 2013 09:07:53 -0800


--e89a8fb1eb8a0f7ee004d4848d15
Content-Type: text/plain; charset=ISO-8859-1

I am surprised the behavior of the canoo webtest jquery append(""). I am
having page which is having ready function which updates div with
append(""). This is working fine with both the htmlunit(2.10) and canoo
webtest(R_1822). If am moved the ready funtion to the .js file, it was not
working in the canoo webtestt(R_1822) and working with the htmlunit(2.10).

As I know if it is working with canoo means it should work with canoo also.
Please suggest me what am missing.I struck here from more than 4 days,
please help me....below


below code is working in both htmlunit and in canoo webtest

page.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    alert("ready called");
    $("#page").append("test123");
});
</script >
</head>
<body>
<div id="page">
</div>
</body>
</html>

below code is working with html unit and not working with canoo webtest

page.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="test.js"></script>
</head>
<body>
<div id="page">
</div>
</body>
</html>

test.js
$(document).ready(function() {
    alert("ready called");
    $("#page").append("test123");
});

(canoo webtest script xml)
   <invoke url="file:///H:/java/sample/page.html" description="testing
sample"/>
              <verifyText text="test123" />

--e89a8fb1eb8a0f7ee004d4848d15
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I am surprised the behavior of  the canoo webtest jquery  append(&quot;&quo=
t;). I=20
am having page which is having ready function which updates div with=20
append(&quot;&quot;). This is working fine with both the htmlunit(2.10) and=
 canoo=20
 webtest(R_1822). If am moved the ready funtion to the .js file, it was=20
not working in the canoo webtestt(R_1822) and working with the =20
htmlunit(2.10).
<br>

<br>
As I know if it is working with canoo means it should work with canoo=20
also. Please suggest me what am missing.I struck here from more than 4=20
days, please help me....below =20
<br>

<br>

<br>
below code is working in both htmlunit and in canoo webtest
<br>

<br>
page.html
<br>
&lt;html&gt;
<br>
&lt;head&gt;
<br>
&lt;meta http-equiv=3D&quot;Content-Type&quot; content=3D&quot;text/html; c=
harset=3DISO-8859-1&quot;&gt;
<br>
&lt;title&gt;Insert title here&lt;/title&gt;
<br>
&lt;script type=3D&quot;text/javascript&quot; src=3D&quot;jquery-1.7.2.min.=
js&quot;&gt;&lt;/script&gt;
<br>
&lt;script type=3D&quot;text/javascript&quot;&gt;
<br>
$(document).ready(function() {
<br>
=A0=A0=A0=A0alert(&quot;ready called&quot;);
<br>
=A0=A0=A0=A0$(&quot;#page&quot;).append(&quot;test123&quot;);
<br>
});
<br>
&lt;/script &gt;
<br>
&lt;/head&gt;
<br>
&lt;body&gt;
<br>
&lt;div id=3D&quot;page&quot;&gt;
<br>
&lt;/div&gt;
<br>
&lt;/body&gt;
<br>
&lt;/html&gt;
<br>

<br>
below code is working with html unit and not working with canoo webtest
<br>

<br>
page.html
<br>
&lt;html&gt;
<br>
&lt;head&gt;
<br>
&lt;meta http-equiv=3D&quot;Content-Type&quot; content=3D&quot;text/html; c=
harset=3DISO-8859-1&quot;&gt;
<br>
&lt;title&gt;Insert title here&lt;/title&gt;
<br>
&lt;script type=3D&quot;text/javascript&quot; src=3D&quot;jquery-1.7.2.min.=
js&quot;&gt;&lt;/script&gt;
<br>
&lt;script type=3D&quot;text/javascript&quot; src=3D&quot;test.js&quot;&gt;=
&lt;/script&gt;
<br>
&lt;/head&gt;
<br>
&lt;body&gt;
<br>
&lt;div id=3D&quot;page&quot;&gt;
<br>
&lt;/div&gt;
<br>
&lt;/body&gt;
<br>
&lt;/html&gt;
<br>

<br>
test.js
<br>
$(document).ready(function() {
<br>
=A0=A0=A0=A0alert(&quot;ready called&quot;);
<br>
=A0=A0=A0=A0$(&quot;#page&quot;).append(&quot;test123&quot;);
<br>
});
<br>

<br>
(canoo webtest script xml)
<br>
=A0=A0=A0&lt;invoke url=3D&quot;<a>file:///H:/java/sample/page.html</a>&quo=
t; description=3D&quot;testing sample&quot;/&gt;
<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0&lt;verifyText text=3D&quot;test1=
23&quot; /&gt;

--e89a8fb1eb8a0f7ee004d4848d15--