Change your system call to call rubyw which won't open a command window:

c = "start rubyw #{shortName}\\watir\\clickJSDialog.rb #{button} #{waitTime} "


Here's more information in the Pickaxe book:
http://www.rubycentral.com/book/win32.html

-Charley

On 12/21/06, VIKASH KUMAR <[EMAIL PROTECTED]> wrote:

I running test cases under Windows Environment, using ruby, watir
1.5.1.1100.



I have the following code:

require 'watir' # the watir controller

require 'watir/winClicker.rb'
require 'watir\contrib\enabled_popup'

test = "C:\\aa.htm"

ie=Watir::IE.start(test)





def startClicker( button,ie,waitTime = 3)
   w = WinClicker.new
   longName = ie.dir.gsub("/" , "\\" )
   shortName = w.getShortFileName(longName)
   c = "start ruby #{shortName}\\watir\\clickJSDialog.rb #{button} #{waitTime}
"
   puts "Starting #{c}"
   w.winsystem(c)
   w=nil
 end







startClicker("OK",ie,3)
ie.button("Submit").click





The above is working fine, but when the method startClicker is called, it
displays a command shell/prompt of ruby.exe, showing some message.  I want
the command shell/prompt doesn't comes up or if it is necessary for the
prompt to come up, it should open in minimized state.



Please, help me out from this.

Thanks in advance

Vikash

Send free SMS to your Friends on Mobile from your Yahoo! Messenger.
Download Now! http://messenger.yahoo.com/download.php

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to