From: Ahmed A. <asa...@ya...> - 2014-01-19 07:59:02
|
Hi Arya, Please read http://htmlunit.sourceforge.net/faq.html#AJAXDoesNotWork Ahmed ________________________________ From: Arya Farzan <ary...@gm...> To: htm...@li... Sent: Sunday, January 19, 2014 6:22 AM Subject: [Htmlunit-user] HtmlPage returning form instead of content I'm using the following code to submit a form HtmlForm form = page.getForms().get(0); form.getInputByName("file0").setValueAttribute("1.jpg"); HtmlPage page2 = form.getInputByValue("Submit").click(); This "sometimes" returns the server's response, but sometimes returns the form itself when I print page2's text or xml. Am I doing something wrong here? |