From: Ahmed A. <asa...@ya...> - 2015-03-06 08:47:01
|
Hi again, >> BTW: How to quote your answer in the email ? You can quote it like that. It is always better to have a case that others don't spend time to reach what you already have. I guess the Chinese character thingy really needs to be fixed, please verify if your case is similar to https://sourceforge.net/p/htmlunit/bugs/1623/, and lets' try to find a fix there. I have error processing https://a.alipayobjects.com/authcenter/login/1.2.2/js/login.js, and real chrome shows garbage characters. Please provide your local complete project and your complete java code to take this further. You can also submit a bug report. Ahmed From: stand4love <sta...@16...> To: htmlunit-user <htm...@li...> Sent: Friday, March 6, 2015 9:36 AM Subject: Re: [Htmlunit-user] 'DomNode has not been set for this SimpleScriptable' error occurs when submit the form Let me provide a bit more info: The login page (https://auth.alipay.com/login/index.htm) needs to be accessed using mobile user-agent: Mozilla/5.0 (iPad; U; CPU OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5 Then the page will show username and password inputs (rather than activex control). Then I fill the username, password, and the verification code, and submit the form: HtmlTextInput nameInput = (HtmlTextInput) loginPage.querySelector("#J-input-user"); nameInput.focus(); nameInput.setValueAttribute(username); nameInput.blur(); HtmlPasswordInput pwdInput = (HtmlPasswordInput) loginPage.querySelector("#password_input"); pwdInput.focus(); pwdInput.setValueAttribute(password); pwdInput.blur(); // enter verify-code HtmlTextInput verifyCodeInput = (HtmlTextInput) loginPage.querySelector("#J-input-checkcode"); verifyCodeInput.focus(); verifyCodeInput.type(verifyCode); verifyCodeInput.blur(); HtmlSubmitInput buttonInput = (HtmlSubmitInput) loginPage.querySelector("#J-login-btn"); webClient.waitForBackgroundJavaScript(10000); HtmlPage mainPage = buttonInput.click(); webClient.waitForBackgroundJavaScript(10000); Then that error occurs. (Note that due to the chinese character issues, now all the js files are loaded from local file system, I created a custom WebConnectionWrapper to intercept the js requests). 2015-03-06 stand4love ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |