From: Vasudevan C. <vco...@gm...> - 2015-08-05 16:59:17
|
Hi All, I am using the default JS engine that is bundled with JDK 1.6 (Rhino Engine). I have been trying to use the methods supported by javax.script.* classes to execute the javascript methods. One of the javascript files use window.atob and window.btoa functions and that was throwing exception since window object was undefined. I used HTMLUnit to instantiate a webClient and followed by getScriptObject to get the Window object. This window object was passed to JS using engine.put method. I was not getting the expected results after window.atob call in JS. I also tried printing the window object using window.toString(). I saw the signature of the atob method but the not code inside the method. What should I do in JS so that window.atob function defined in HTMLUnit under WIndow class gets executed correctly. Looking forward to your help and suggestions to solve this problem. Regards Vasu PS: I am not using the JS engine bundled with HTMLUnit. |