Hi Rachel,

If the fail case works and the pass case is throwing an error, then it is
likely to be a JavaScript error - however, I think we would need to see more
of the relevant page to be able to assist.

Ideally the simplest cut-down version of your web page that still causes the
problem. If that is too hard to unravel, some additional excerpts in particular
showing the JavaScript that is getting called and the relevant place it is
being called from - possibly an onclick action on your button or an onsubmit
action on your form in the HTML of the page.

Cheers, Paul.

Rachel Swailes wrote:
Hi there,

I'm getting started with webtest and I've written a small test to test the login page of the application I'm working on. It's a simple login page with the username and password field and a login button.

The relevant piece is...

<clickButton description="Try login with good details"
    label="Login" />
<verifyText  description="Should get into the center"
    text="Center Main Page" />

When the process gets to the part about clicking the button, it gives me this error (again, the relevant piece)

[webtest] 2006/02/03 03:03:31 org.apache.commons.httpclient.HttpMethodDirector isRedirectNeeded
[webtest] INFO: Redirect requested but followRedirects is disabled
[webtest] (request.TargetHelper) 80 ) ScriptException: enclosed exception was "Can't find enclosing select element" [webtest] (steps.Step 420 ) Exception thrown from this class: com.canoo.webtest.engine.StepFailedException

I have another test that clicks on this button with bad login info to test that the login should fail and that test works fine. This test (the one that is generating the errors above) is given good login data and is supposed to check that the login works.

The only info I can find online is that it could be something to do with the javascript that is called to verify the login. But I don't know what I would need to change in order to get this test to work.

Any advise would be greatly appreciated!
Rachel

Btw: Appologies if this came through twice, I sent it once before I subscribed and it didn't get through...

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest



_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to