[Webtest] FW: help

Dierk König webtest@lists.canoo.com
Fri, 10 May 2002 14:15:49 +0200


Hi Heiko,

WebTest cannot test JavaSkript.

Therefore you will not be able to test, that your go_to_login() function
return the proper String.

But you can test that the anchor calls the login function to determine the
href.
(you can use verifytext with regex for this or verifyxpath).

To navigate to the expected href you cannot just follow the link.
You need to do an explicit invoke step with the expected href.

hope that helps
Mittie

> -----Original Message-----
> From: webtest-admin@lists.canoo.com
> [mailto:webtest-admin@lists.canoo.com]On Behalf Of Dierk König
> Sent: Freitag, 10. Mai 2002 13:29
> To: Webtest@Lists. Canoo. Com
> Subject: [Webtest] FW: help
>
>
>
>
> -----Original Message-----
> From: webtest-owner@lists.canoo.com
> [mailto:webtest-owner@lists.canoo.com]On Behalf Of Ritzmann, Heiko
> Sent: Freitag, 10. Mai 2002 11:33
> To: 'webtest-admin@lists.canoo.com'
> Subject: WG: help
>
>
>
>
> Heiko Ritzmann
> Software Development
> GODYO AG
> Prüssingstraße 35
> D-07745 Jena
>
> e-mail: heiko.ritzmann@godyo.com
> Telefon: +49 36 41 2 87-2 92
> Telefax: +49 36 41 2 87-2 87
> Internet: www.godyo.com
>
>
> -----Ursprüngliche Nachricht-----
> Von: Ritzmann, Heiko
> Gesendet: Freitag, 10. Mai 2002 11:24
> An: 'WebTest-request@lists.canoo.com'
> Betreff: help
>
>
> Hi,
>
> is it possible to test something like the following code with cocoon?
>
> 	...
> 	<script language="JavaScript">
> 		function go_to_login(){
>
> window.open('login','BauerfeindLogin','width=313,height=176,left=3
> 00,top=250
> ');
> 		}
> 	</script>
> 	...
> 	<a href="javascript:go_to_login();" name="toLogin">
> 		<img src="../images/bf_logo.gif" border="0" alt="Zum
> Login"/>
> 	</a>
>
> If I do a test like this
>
> 	<clicklink stepid="Klick den Link zur Login-Seite" label="Zum
> Login"/>,
>
> I get the error message:
>
> 	"Error encountered:
> normal(com.canoo.webtest.engine.ConfigurableTestCase): unknown protocol:
> javascript ..."
>
> Thanks
>
> Heiko
>
>
>
>
>
>
>
>
> Heiko Ritzmann
> Software Development
> GODYO AG
> Prüssingstraße 35
> D-07745 Jena
>
> e-mail: heiko.ritzmann@godyo.com
> Telefon: +49 36 41 2 87-2 92
> Telefax: +49 36 41 2 87-2 87
> Internet: www.godyo.com
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>