Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Problem with setting text field in JWebUnit

Thread Tools

Problem with setting text field in JWebUnit

Posts: n/a
Hi, I am using JWebUnit to test a website.

Using the setTextField method of WebTestCase, I am able to set the
text in a text field - normally this works fine.

However, on a page with multiple forms that share names, am having

The setWorkingForm method works fine for making sure the correct
submit button is clicked, but when I use setTextField it seems to go
back to the other form.

E.g. I want to set the "email" field in the login form. The
registration form also has an "email" field, so I use setWorkingForm
before I use setTextField.

For some reason, the setTextField method is changing the working form
back to the registration form.

Am I doing something wrong?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript validation for a not required field, field is onlyrequired if another field has a value jr Javascript 3 07-08-2010 10:33 AM
JWebUnit for php? Laverna Java 0 12-13-2007 10:19 AM
1.Enter space bar for field names and save the field.The field shoud not get saved and an alert should be there as"Space bars are not allowed" Sound Javascript 2 09-28-2006 02:43 PM
mulithreaded tests with jwebunit Java 1 01-16-2006 06:11 PM
HttpUnit JWebUnit for WAP apps DNasmars Java 0 08-26-2003 04:46 PM