From: Vasudevan C. <vco...@gm...> - 2015-06-19 13:47:47
|
Hi Ahmed, This is the URL that I used. http://www.patcurtis.com/captcha/recaptcha_demo.php What I would like to achieve is teh following? I run an instance of Webclient with JS disabled. But I received a screen from the webserver which has the google recaptcha script embedded. Now, I would like to instantiate another webclient thread with JS enabled which should do the job for me and return the URL of the captcha image. Is it possible to do that or is there any other way by which I can achieve this. I ultimately need the URL of the captcha image constructed by the JS. Regards Vasu On 19 June 2015 at 18:42, Ahmed Ashour <asa...@ya...> wrote: > Hi Vasu, > > The URL provided is of javascript. > > Please provide the URL of the html used, or your minimal java code. > > Ahmed > ------------------------------ > *From:* Vasudevan Comandur <vco...@gm...> > *To:* "htm...@li..." < > htm...@li...> > *Sent:* Friday, June 19, 2015 12:40 PM > *Subject:* [Htmlunit-user] HTMLUnit does not seem to execute the > Javascript > > Hi, > > I tried the initial URL > http://www.google.com/recaptcha/api/challenge?k=6Lf1-AQAAAAAAL9EskceOVja5Uh5_yo1FRtb1Q83 > to google recaptcha service which sent the response > a javascript file. The javascript file had a line as follows which is > given below: > > *********************************************** > var RecaptchaState = { > challenge : > '03AHJ_VuvDfAzpjod2KO2emYL2RLhxNxZvUyYqynapgkkc_OkLbqV93bxmdirD3B4Wtd66edBqRc_k6OZfBQ1XVAA9i0uMHPjQOKJ46OLZm0UenLc7trte3O6VMfItNaGtMGZGj35Sod10ITmuYFUwHjkHoak4OkacvVaJmXpnynPFfheVoqLO-ier_b2LmNpcfIXoIUqMACHWmf5JJYpKN_j7Hj2Xw2G9dyKAgmOpZkxsyV_n-9rNQqWdO0CcDddZlGc99CnadTMluLHl8gTwYsU15lqTD3DhbQ', > timeout : 1800, > lang : 'en', > server : 'http://www.google.com/recaptcha/api/', > site : '6Lf1-AQAAAAAAL9EskceOVja5Uh5_yo1FRtb1Q83', > error_message : '', > programming_error : '', > is_incorrect : false, > rtl : false > }; > > document.write('<scr'+'ipt type="text/javascript" s'+'rc="' + > RecaptchaState.server + 'js/recaptcha.js"></scr'+'ipt>'); > > ************************************************** > > I did not see the request in Charles for downloading the recaptcha.js as > part of > JS execution in HTMLUnit. > > I had enabled webclient to execute JS. > > Is there any issue with HTMLUnit.? > > I see the normal browser sending the request to download the > recaptcha.js file. > > Any idea why this discrepancy. > > Any pointers and help is greatly appreciated > > Regards > Vasu > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > |