Here Robert, try this:
require 'watir'
b = Watir::IE.new
execute_script(b.document.parentWindow.execScript("alert('hello');"))
On Aug 20, 11:29 pm, robert <[email protected]> wrote:
> Thanks George,
>
> Yes that works but I'm puzzled by the difference between the code and
> the generated documentation
> athttp://wtr.rubyforge.org/rdoc/classes/Watir/IE.html#M000248
>
> On Aug 21, 4:57 am, George <[email protected]> wrote:
>
>
>
> > Hi Robert,
>
> > I couldn't get that to work either, but this worked for me:
>
> > require 'watir'
> > b = Watir::IE.new
> > b.document.parentWindow.execScript("alert('hello');")
>
> > I'm not sure if that's an acceptable approach to your problem, but it
> > is one solution.
>
> > -George
>
> > On Aug 19, 8:40 pm, robert <[email protected]> wrote:
>
> > > Hi all,
>
> > > Having a problem calling this method on IE. What am I missing?
>
> > > # Win Xp, IE7>irb
>
> > > irb(main):001:0> require 'watir'
> > > => true
> > > irb(main):005:0> b = Watir::IE.new
> > > [snip]
> > > irb(main):006:0> b.execute_script "alert('hello');"
> > > NoMethodError: undefined method `execute_script' for #<Watir::IE:
> > > 0x2bca76c>
> > > from (irb):6
> > > irb(main):007:0>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---