[Webtest] How to debug when no errors
webtest@lists.canoo.com
webtest@lists.canoo.com
Tue, 03 Feb 2004 00:11:24 +0000
Thanks, Jeff.
There are js.jars all over the place. I have the $webtesthome/lib/js.jar in
my classpath. Is there something else I need to do to make sure I have it?
I'm a little confused because I thought Canoo supports Javascript. I'll get
one of the programmers to help me, since I don't know how to write webtest
tags.
If anyone can point me to a particular posting, please do! I haven't found
the right one yet.
Thank you!
-- Lisa
> My guess is that the "here" link actually works with javascript. You can't
> submit forms using a link unless there is some javascript involved. This is
> why you are getting the same page back--the javascript is not getting
> interpreted properly or at all. Take a look at the <a href=". . ."> value
> in the HTML for your link. By default, Canoo is just going to take whatever
> is in the href attribute and try to go there. If it is something like "#"
> you will just link to the same page. If the link tag has an "onclick"
> handler, that's probably what does the real work.
>
> Two things:
>
> 1. Make sure that httpunit has the "js.jar" installed. Otherwise the
> javascript won't run at all
>
> 2. The "setinputfield" doesn't actually set values on the DOM, so the
> javascript won't be able to read them. I ended up having to write my own
> webtest tags (e.g., "setjsformfield" to access the underlying HttpUnit
> functionality needed). I think that other people have posted similar things
> to this list.
>
>
> ----- Original Message -----
> From: <lisa.crispin@att.net>
> To: <webtest@lists.canoo.com>
> Sent: Friday, January 30, 2004 7:45 PM
> Subject: [Webtest] How to debug when no errors
>
>
> > I've just started doing some very simple tests with WebTest. I can test
> > clicking on links just fine in our own app. I was able to do a script to
> > test login on the www.DexOnline.com public website. However, I can't get
> my
> > login test on our own site to work. It doesn't get any errors - it just
> > doesn't log in. If I change the name of the submit button, it complains,
> so
> > I know it is finding the button. If I put an invalid password, it does
> not
> > complain, so it's not really submitting. The results.xml file
> > shows 'completed' and a duration, but the html result shows that it just
> came
> > up with the login page again, and in results.xml, there is no 'htmlparser'
> > output for that step. The verify step which comes next fails, of course.
> >
> > I think my script looks ok, since the same thing works on the DexOnline
> site,
> > but I don't know why entering the userid and password and clicking submit
> > doesn't actually make it do anything.
> >
> > My question is, does anyone have any tips for how I can go about debugging
> > this? I've looked at all the doc and samples in the doc I could find for
> > clickbutton. I've searched on this mailing list, and like I said I did
> the
> > same test for a similar website which worked, so I'm stumped. No doubt it
> is
> > something very obvious, but I don't know how to look for it from here.
> >
> > Here's the pertinent part of my xml file:
> > <setinputfield stepid="Enter userid"
> > name="username" value="Fast401k"/>
> >
> > <setinputfield stepid="Enter password"
> > name="password" value="aaaaa"/>
> >
> > <clicklink stepid="Click the here link"
> > label="here"/>
> >
> >
> > <verifytext stepid="Admin Home Page verify"
> > text="<title>Admin Tool;<title>"/>
> >
> > Thank you,
> > Lisa
> > _______________________________________________
> > WebTest mailing list
> > WebTest@lists.canoo.com
> > http://lists.canoo.com/mailman/listinfo/webtest
> >
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest