From: Ahmed A. <asa...@ya...> - 2014-02-06 17:28:06
|
Hi Ronald, For the below, I am not able to correctly login. final WebClient webClient = new WebClient(BrowserVersion.CHROME); final HtmlPage page = webClient.getPage("http://mrbs.sourceforge.net/mrbs/admin.php"); page.<HtmlInput>getHtmlElementById("NewUserName").type("admin"); page.<HtmlInput>getHtmlElementById("NewUserPassword").type("admin"); HtmlPage page2 = page.<HtmlInput>getHtmlElementById("NewUserName").click(); System.out.println(page2.asText()); It gives: "Unknown user Log in You do not have the necessary rights to view this page." Ahmed From: Ronald Brill <rb...@rb...> To: "htm...@li..." <htm...@li...>; "rg...@gm..." <rg...@gm...> Sent: Thursday, February 6, 2014 8:04 PM Subject: Re: [Htmlunit-user] First obstacles, javascript exception for MRBS. On Thu, 06 Feb 2014 16:47:44 +0100 rg...@gm... wrote: > >Am 05.02.2014 21:55, schrieb Ronald Brill: >>> >/usr/share/htmlunit-2.8.jar -- for WebSite and other classes. >>> > >> The current release version is 2.13 and 2.14 will be available shortly. >> So start with the latest release or download the lastes snapshot from http://build.canoo.com/htmlunit/artifacts/. >> >> RBRi > > >Dear Ronald, > >thanks for pointing this out. Now, I got the most recent >version including all dependencies. I took a while until >I managed to add missing libraries to the classpath list >one by one, as I use quite a basic build environment called >BlueJ. Is there a project file to start with, either for >Eclipse or Netbeans? Hi Ralf, you are really sure that you use the latest snapshot. I did a quick WETATOR test with the latest HtmlUnit and friends and it works fine. Was able to login without any problem. Or was there any change on the webpage itself in between? RBRi |