Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > MAXIMIZE the Browser Automaticaly

Reply
Thread Tools

MAXIMIZE the Browser Automaticaly

 
 
King Maker
Guest
Posts: n/a
 
      05-21-2010

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/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to maximize the browser window that fits the monitor size? jrefactors@hotmail.com HTML 9 04-28-2011 02:23 PM
Browser MAximize Rick Humphrey ASP .Net Web Controls 0 08-07-2005 05:50 PM
how to maximize the browser window that fits the monitor size? jrefactors@hotmail.com Javascript 7 01-06-2005 06:53 PM
How to make a page stay open only for few soconds, then redirect automaticaly to another page NWx ASP .Net 3 02-16-2004 05:21 PM
automaticaly assign key in query with sqlserver Thierry ASP .Net 1 10-21-2003 08:46 AM



Advertisments