From: Vasudevan C. <vco...@gm...> - 2015-06-24 18:08:58
|
Hi Ahmed, I was tracing the execution of HTMLUnit version 2.15 as part of the Google Recaptcha Widget download which happens through JS and image display using the demo URL http://www.patcurtis.com/captcha/recaptcha_demo.php site. I added few print statements in HtmlScript.java file inside executeScriptIfNeeded and setAttributeNS methods. I did not see any download of image files which are there as part of the widget since HTMLUnit does not download the image files by default. SetAttributeNS method treats the below URL generated as part JS execution as type=text/javascript. src = http://www.google.com/recaptcha/api/reload?c=03AHJ_VuvmwTN2LxSz8J7dtNZX81A l0QFvt2JyKcpqXcCP6Ebhbs1iwjCwTj3mxGkjAoc-nv-JljJtbSblYrhKA3zK9lhsC4GWpyGJvVWuJ-dT7N28xReMFBWpNG5qmRAQkTdAUIiUPESqA56HaP4QvIp7pLj5q7R dI-GsTBZNl4wTbb0CE4nS4H2QNkXJk69K22y7XGoZoplGnVqZo3-eCceM0vNuNZC4ag&k=6Lf1-AQAAAAAAL9EskceOVja5Uh5_yo1FRtb1Q83&reason=i&type=image&l ang=en-GB&th=,coOwiE56XYH9N2a2lyztIOsFl5bwAAACoKAAAABu2AC0rMWOid-5CTrmKC6e3ami38LUaxj93ocIgqGTY9RGp7USlJXefyMwL0PSDWZB8F-jfGsT3SYmtI -bcmXTBjwgs6KUmyzE_KPa_Oy4p6XOmGR1rCGzxC1_qTKf960khqvhaYs3YR2X2RIFC1fWREKGDa2UFrJXeUcK0B8ZmaPuCM4ApSWV7FEHSlbM4u3AkfT5JlCPADOI_jtV2Z GozH4Z-bSuwjQG048s9Z7di_Jq03cvf7lP The response data is given below which was captured inside loadJavascriptfromURL Inside loadJavaScriptFromUrl Method in HTMLPage.java file...Recaptcha.finish_reload('03AHJ_VuvsYkou1euMxszLTJzD0IQCRKynnIGDBJckG-APe XiFr8ncPLZK7kS1rhIY_YT4triXHvkIlMwSDtTYsYw32_ntpqnarqJS_JAS0CICMFwB6AIy-pN3rNZRsDn2CJUSvUfscaW6WDAw1SlAzyV82rMSgvf6ijr_8y_MTWR6qA7N0 iHYTVsHATqbPVIkiUzMppmamHuHp5YL-UvmupP9Hzk92P55Ww', 'image', null, null); Finish_reload is a method which is inside recaptcha.js file which was download in the beginning that takes four arguments. I saw the executeEventIfBrowserHasFeature method was called with EVENT_ONLOAD_EXTERNAL_JAVASCRIPT params. But the finish_reload method was NOT getting executed. It would be great if someone helps me to figure out the reason. Looking forward to a reply. Regards Vasu |