[Wtr-general] Sending Tabs

Charley Baker charley.baker at gmail.com
Wed Jul 12 10:38:23 EDT 2006


Hi Aidy,

  You can send tabs through AutoIt. Take a look at WindowHelper.rb. You can
easily extend it with something like this:
class WindowHelper
  def push_tab
        @autoit.WinWait "Your dialog title", ""
        @autoit.Send "{TAB}"
  end
end

-Charley

On 7/12/06, Adrian Rutter <Adrian.Rutter at tnt.com> wrote:
>
>
> Hi,
>
> Is there a better way of sending tabs through Watir than using the windows
> scripting host?
>
> require 'win32ole'
> wsh = WIN32OLE.new("WScript.Shell")
>   i=0
>   loop do
>     wsh.SendKeys "{TAB}"
>     i += 1
>     break unless i <=14
>   end
>
> cheers
>
> aidy
>
>
>
>
> ---------------------------------------------------------------------------------------------------------------
> This message and any attachment are confidential and may be privileged or
> otherwise protected from disclosure.
> If you are not the intended recipient, please telephone or email the
> sender and delete this message and any attachment from your system.
> If you are not the intended recipient you must not copy this message or
> attachment or disclose the contents to any other person.
>
> ---------------------------------------------------------------------------------------------------------------
> _______________________________________________
> 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/20060712/45a682e6/attachment.html 


More information about the Wtr-general mailing list