MAXIMIZE the Browser Automaticaly

Discussion in 'Ruby' started by King Maker, May 21, 2010.

  1. King Maker

    King Maker Guest

    I try Many thing but not find the best solution to maximize the window.
    i run the script every time window open in the normal size.

    ........................ Help me ..........................

    require 'watir'
    include Watir

    ie=Watir::IE.start("http://www.google.co.in")

    #~ie.maximize

    # Minimize the window
    def maximize
    set_window_state :SW_MAXIMIZE
    end
    def set_window_state(state)
    autoit.WinSetState title, '', autoit.send(state)
    end
    def autoit
    Watir::autoit
    end

    def self.autoit
    unless @@autoit
    begin
    @@autoit = WIN32OLE.new('AutoItX3.Control')
    rescue WIN32OLERuntimeError
    _register('AutoItX3.dll')
    @@autoit = WIN32OLE.new('AutoItX3.Control')
    end
    end
    @@autoit
    end

    Version:
    gem 0.9.4
    ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
    --
    Posted via http://www.ruby-forum.com/.
     
    King Maker, May 21, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Thierry
    Replies:
    1
    Views:
    339
    Wim Hollebrandse
    Oct 21, 2003
  2. NWx
    Replies:
    3
    Views:
    484
  3. Replies:
    9
    Views:
    19,723
  4. Rick Humphrey

    Browser MAximize

    Rick Humphrey, Aug 7, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    119
    Rick Humphrey
    Aug 7, 2005
  5. Replies:
    7
    Views:
    156
    Grant Wagner
    Jan 6, 2005
Loading...

Share This Page