Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

httpunit and ant  RSS feed

david weikeqi
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,
I met a problem, it blocked me for a long time.

The code as below,

WebConversation con = new WebConversation();
PostMethodWebRequest req = new PostMethodWebRequest("loginPage.jsp", true);
WebResponse loginResponse = conversation.getResponse(request);
WebForm loginForm = loginResponse .getFormWithName("loginform");
loginForm.setParameter("username", "username");
loginForm.setParameter("password", "password");

When the script was invoked by TestNG, it works well, but with Ant, I need to wait for a long time to get the reponse after submit the form, but from the app console I noticed that it has logged in as soon as the form was submitted.

please help me guys, thanks.

Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!