Hi,

I am trying to define a JavaScript function and execute it from the
Watir Script.

This function will return the cookies of the current IE window.

Defining the function:

js_stuff = <<-end_js_stuff
  var myCookie = document.cookie;
  return cookies;
end_js_stuff

Call:

myCookies = ie2.execute_script(js_stuff)


I am geeting following errors:


WIN32OLERuntimeError: execScript
    OLE error code:80020101 in <Unknown>
      Could not complete the operation due to error 80020101.
    HRESULT error code:0x80020009
      Exception occurred.
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-
class.rb:388:in `method_missing'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-
class.rb:388:in `execute_script'


Note: The reason I am not using the Watir function
"ie2.document.cookie", is that it doesn't return all cookies. (If
possible, I would also like to know why Watir is not returning all
Cookies.)
         I have verified the JavaScript code by deploying it in out
SIT environment and it returns all cookies.

Can someone please help me with this?

Thanks,
Krunal.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to