[Wtr-general] how to minimize command prompt of ruby.exe
Charley Baker
charley.baker at gmail.com
Fri Dec 22 11:57:08 EST 2006
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 <vikashkumar051 at yahoo.co.in> 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
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061222/5debaf26/attachment.html
More information about the Wtr-general
mailing list