wood burning stoves*
The moose likes Testing and the fly likes selenium, testng, eclipse processing a form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "selenium, testng, eclipse processing a form" Watch "selenium, testng, eclipse processing a form" New topic
Author

selenium, testng, eclipse processing a form

Manon Baratt
Ranch Hand

Joined: Jan 30, 2006
Posts: 58
Hi,

I am using selenium and testng in eclipse. I have a struts application. I fill out the form using selenium ide, export it to Java. The collected data by selenium does not get passed to the form to be processed by my ProcessRequest action. Here are part of the code I am running:

selenium.type("lastName_field", "Tester");
selenium.type("firstName_field", "Test");
...
...
selenium.open("/requests/ProcessRequest.do");
selenium.click("submit");
selenium.waitForPageToLoad("30000");

How do I pass it?

Thanks for your help.
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Most likely it should be in this order


Manon Baratt
Ranch Hand

Joined: Jan 30, 2006
Posts: 58
Thanks for your reply. Actually, the order I have is correct. First I fill out the form and then let the action process it.
Manon Baratt
Ranch Hand

Joined: Jan 30, 2006
Posts: 58
This is so weird. Selenium ide is not consistent. I reran the code, exported the result and it does not have the ProcessRequest line and it works fine without it. In one attempt, it did put it before entering the data in the fields.
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
I personalty would not rely on record-playback feature
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: selenium, testng, eclipse processing a form
 
Similar Threads
running the selenium(java) script close the browser
Junit4+Eclipse+Selenium RC- Test class should have exactly one public zero-argument constructor
Selenium
Looking for an Open Source Automated testing tool for web application
Eclipse and TestNG plugin - How to pass on arguments in 'Run Configurations' TestNG panel