On Thu, May 22, 2008 at 4:28 AM, Pranjal Jain <pranjal.jain123 / gmail.com> wrote:
> Hi
> I am having a LoadRunner File which I want to  run via Ruby Script.
> I am trying to  execute it proper functioning,  but can't.
>
> I am putting the script here; please suggest if i  am committing any
> mistake.
>
> Script is as follows :
>
>
> # WinClicker Library of Watir module  required
> require 'watir/winClicker'
>
> # path of the script is specified
> Dir.chdir("d:/Load Runner/gmail") {system("gmail.usr")}

Kernel.system doesn't know how to handle these files.  You'd get the
same thing if you tried to run a ruby file:

# test .rb
puts 'hello world'

# irb session
>> system('test.rb')
=> false
>> system('ruby test.rb')
hello world
=> true
>> system('call test.rb')
hello world
=> true

So, either write the command so that it calls the executable that runs
your .usr file, or use 'call'.

Hope that helps,

Gordon


> #sleep 25
> #wsh.SendKeys('{F5}')
>
>
> Thankx in advance :)
> --
> Posted via http://www.ruby-forum.com/.
>
>