Wesley,

Replace exec() with eval() - this will run (evaluate) the Ruby code  
you provide as an argument to it, in the current context.

Best wishes,

Alex Collins

On 25 May 2009, at 11:56, Wesley Chen wrote:

> Hi, guys,
> I have the requirement like:
> require 'watir'
> $ie=Watir::IE.new
> str1="$ie.goto('www.google.com')"
> exec(str1)
> $ie.close
> It can't succeed.
> Anybody knows how to go through it? so that I can open the IE, then  
> goto www.google.com, then close the IE window?
>
> Any suggestion would be quite appreciated.
>
> Thanks.
> Wesley Chen.
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to