[Webtest] JavaScript error

Bhandari, Nikhil Bhandari, Nikhil" <Nikhil_Bhandari@intuit.com
Mon, 26 Nov 2007 15:44:07 +0530


I am using WebTest 2.5

- Nikhil

-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com] On Behalf Of Marc Guillemot
Sent: Friday, November 23, 2007 8:10 PM
To: webtest@lists.canoo.com
Subject: Re: [Webtest] JavaScript error

Hi,

which WebTest version do you use?

The problem may be cause by a js error or most probably in this case by
a limitation in HtmlUnit js support. In this case you should try with
the latest version of WebTest with a recent snapshot of HtmlUnit,
perhaps does it already work.

Marc.
--=20
Blog: http://mguillem.wordpress.com



Bhandari, Nikhil wrote:
> I am getting a JavaScript error while running my first script of
WebTest.
>=20
> =20
>=20
> *Message*
>=20
> JavaScript error loading page
>
https://login.qa.quickbooks.com/j/qbn/auth/employee?service_flags=3D0&url=
=3D
http%3A%2F%2Fqbo.qa.quickbooks.com%2Fqbo%23%23c2004c%23%23%2Flogin%2Frec
ordnew&serviceid=3D2004:
> TypeError: Cannot read property "style" from undefined (Embedded
script
> in
>
https://login.qa.quickbooks.com/j/qbn/auth/employee?service_flags=3D0&url=
=3D
http%3A%2F%2Fqbo.qa.quickbooks.com%2Fqbo%23%23c2004c%23%23%2Flogin%2Frec
ordnew&serviceid=3D2004
> from (561, 11) to (0, 0)#1)
>=20
> *Location*
>=20
> D:\Software\WebTest\QBOE_Test\tests\QBOEWebTest.xml (line: 13)
>=20
> *Details*
>=20
> *javascript error*
>=20
> =09
>=20
> TypeError: Cannot read property "style" from undefined (Embedded
script
> in
>
https://login.qa.quickbooks.com/j/qbn/auth/employee?service_flags=3D0&url=
=3D
http%3A%2F%2Fqbo.qa.quickbooks.com%2Fqbo%23%23c2004c%23%23%2Flogin%2Frec
ordnew&serviceid=3D2004
> from (561, 11) to (0, 0)#1)
>=20
> =20
>=20
> =20
>=20
> *line*
>=20
> =09
>=20
> 1
>=20
> =20
>=20
> =20
>=20
> *javascript source*
>=20
> =09
>=20
> document.all.my_body.style.visibility =3D 'visible';
>=20
> =20
>=20
> =20
>=20
> *failing line*
>=20
> =09
>=20
> document.all.my_body.style.visibility =3D 'visible';
>=20
> =20
>=20
> =20
>=20
> =20
>=20
> _QBOEWebTest.xml_
>=20
> _ _
>=20
> <?xml version=3D"1.0"?>
>=20
> <!DOCTYPE project SYSTEM "../dtd/Project.dtd">
>=20
> <project name=3D"demo.QBOEWebTest" default=3D"test">
>=20
>             <target name=3D"test">
>=20
>                         <webtest name=3D"check that WebTest for QBOE">
>=20
>                                     &config;
>=20
>                                     <steps>
>=20
>                                                 <invoke
> url=3D"http://qbo.qa.quickbooks.com/qbo4/login/recordnew"
description=3D"Go
> to QBOE"/>
>=20
>                                     </steps>
>=20
>                         </webtest>
>=20
>             </target>
>=20
> </project>
>=20
> =20
>=20
> _Config.xml_
>=20
> <!--
>=20
> Like all files of this folder, this content will be available as
entity
>=20
> using the DTD (here &config;)
>=20
> -->
>=20
> <config
>=20
>             host=3D"qbo.qa.quickbooks.com/qbo4/login/recordnew"
>=20
>             protocol=3D"http"
>=20
>             basepath=3D""
>=20
>             summary=3D"true"
>=20
>             saveresponse=3D"true"
>=20
>             resultfile=3D"${wt.resultfile}"
>=20
>             resultpath=3D"${wt.resultpath}"
>=20
>             haltonfailure=3D"false"
>=20
>             haltonerror=3D"false" />
>=20
> =20
>=20
> =20
>=20
> _Log from command prompt_
>=20
> =20
>=20
>   [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - Starting
webtest
> "check that WebTest for QBOE"
> (D:\Software\WebTest\QBOE_Test\tests\QBOEWebTes
>=20
> t.xml:9: )
>=20
>   [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest:
> R_1551.
>=20
>    [config]  INFO (com.canoo.webtest.engine.Configuration) - Surfing
> with browser Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)
>=20
>     [steps]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
> steps (1/1)
>=20
>    [invoke]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
> invoke "Go to QBOE" (1/1)
>=20
>    [invoke]  INFO
(com.canoo.webtest.steps.request.AbstractTargetAction)
> - -> gotoTarget by URL:
http://qbo.qa.quickbooks.com/qbo4/login/recordnew
>=20
>    [invoke]  INFO (com.canoo.webtest.steps.request.TargetHelper) -
> getting response for url:
http://qbo.qa.quickbooks.com/qbo4/login/recordnew
>=20
>    [invoke]  WARN (org.apache.commons.httpclient.HttpMethodBase) -
> Cookie rejected: "$Version=3D0;
> qbn.qa.url=3Dhttp%3A%2F%2Fqbo.qa.quickbooks.com%2Fqbo%2
>=20
> 3%23c2004c%23%23%2Flogin%2Frecordnew; $Path=3D/;
$Domain=3D.quickbooks.com".
> Domain attribute ".quickbooks.com" violates RFC 2109: host minus
domain
> may n
>=20
> ot contain any dots
>=20
>    [invoke]  INFO (org.apache.commons.httpclient.HttpMethodDirector) -
> Redirect requested but followRedirects is disabled
>=20
>    [invoke]  WARN (org.apache.commons.httpclient.HttpMethodBase) -
> Cookie rejected: "$Version=3D0; qbn.qa.login_test=3Dtestme; $Path=3D/;
> $Domain=3D.quickbook
>=20
> s.com". Domain attribute ".quickbooks.com" violates RFC 2109: host
minus
> domain may not contain any dots
>=20
>    [invoke]  WARN (org.apache.commons.httpclient.HttpMethodBase) -
> Cookie rejected: "$Version=3D0; qbn.qa.debug_pages=3D; $Path=3D/;
> $Domain=3D.quickbooks.com
>=20
> ". Domain attribute ".quickbooks.com" violates RFC 2109: host minus
> domain may not contain any dots
>=20
>    [invoke]  WARN (org.apache.commons.httpclient.HttpMethodBase) -
> Cookie rejected: "$Version=3D0; null.debug_pages=3D; $Path=3D/;
> $Domain=3D.quickbooks.com".
>=20
>  Domain attribute ".quickbooks.com" violates RFC 2109: host minus
domain
> may not contain any dots
>=20
>    [invoke]  WARN (org.apache.commons.httpclient.HttpMethodBase) -
> Cookie rejected: "$Version=3D0;
> qbn.qa.url=3Dhttp://qbo.qa.quickbooks.com/qbo##c2004c##
>=20
> /login/recordnew; $Path=3D/; $Domain=3D.quickbooks.com". Domain =
attribute
> ".quickbooks.com" violates RFC 2109: host minus domain may not contain
> any dots
>=20
>    [invoke]  WARN (org.apache.commons.httpclient.HttpMethodBase) -
> Cookie rejected: "$Version=3D0;
> qbn.qa.metacookie=3DTUVUQV9TRVJWSUNFX0lEPTIwMDQ=3D; $Path
>=20
> =3D/; $Domain=3D.quickbooks.com". Domain attribute ".quickbooks.com"
> violates RFC 2109: host minus domain may not contain any dots
>=20
>    [invoke]  INFO (com.canoo.webtest.engine.WebClientContext) -
Content
> of window changed to about:blank (text/html)
>=20
>    [invoke]  INFO (com.canoo.webtest.engine.WebClientContext) -
Content
> of frame window has changed without javascript while enclosing page is
> loading
>=20
> , it will NOT become current response
>=20
>    [invoke]  INFO (com.canoo.webtest.steps.Step) - Running with: Canoo
> Webtest: R_1551.
>=20
>    [invoke]  INFO (com.canoo.webtest.steps.Step) - Exception thrown
from
> this class: com.canoo.webtest.engine.StepFailedException
>=20
>    [invoke]  INFO (com.canoo.webtest.steps.Step) - Message was:
> JavaScript error loading page
> https://login.qa.quickbooks.com/j/qbn/auth/employee?serv
>=20
>
ice_flags=3D0&url=3Dhttp%3A%2F%2Fqbo.qa.quickbooks.com%2Fqbo%23%23c2004c%=
23%
23%2Flogin%2Frecordnew&serviceid=3D2004:
> TypeError: Cannot read property "style"
>=20
>  from undefined (Embedded script in
>
https://login.qa.quickbooks.com/j/qbn/auth/employee?service_flags=3D0&url=
=3D
http%3A%2F%2Fqbo.qa.quickbooks.com%2Fqbo%2
>=20
> 3%23c2004c%23%23%2Flogin%2Frecordnew&serviceid=3D2004 from (561, 11) =
to
> (0, 0)#1)
>=20
>  INFO (com.canoo.webtest.steps.Step) - Running with: Canoo Webtest:
R_1551.
>=20
>  INFO (com.canoo.webtest.steps.Step) - Exception thrown from this
class:
> com.canoo.webtest.engine.StepFailedException
>=20
>  INFO (com.canoo.webtest.steps.Step) - Message was: JavaScript error
> loading page
> https://login.qa.quickbooks.com/j/qbn/auth/employee?service_flags=3D0&
>=20
>
url=3Dhttp%3A%2F%2Fqbo.qa.quickbooks.com%2Fqbo%23%23c2004c%23%23%2Flogin%=
2
Frecordnew&serviceid=3D2004:
> TypeError: Cannot read property "style" from undefi
>=20
> ned (Embedded script in
>
https://login.qa.quickbooks.com/j/qbn/auth/employee?service_flags=3D0&url=
=3D
http%3A%2F%2Fqbo.qa.quickbooks.com%2Fqbo%23%23c2004c%2
>=20
> 3%23%2Flogin%2Frecordnew&serviceid=3D2004 from (561, 11) to (0, 0)#1)
>=20

_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest