Try this:
 
require 'watir'
 
ie = Watir::IE.start('http://whatever.com/')
ie.maximize
 
or even
 
ie = Watir::IE.start('http://whatever.com/').maximize
 
Zeljko


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Smith
Sent: Tuesday, October 18, 2005 1:03 AM
To: [email protected]
Subject: [Wtr-general] maximize() question

I've just started evaluating Watir as a possible automation solution to our company, however have run into a somewhat embarassing problem right out of the gate. What happens, is when I run the test script the browser window doesn't pop up in a maximized state. I did some reading, and noticed that there's a maximize method I can use to bring it to the proper state before I progress with automation, however I don't seem to be able to incorporate it properly. Below is a simplified copy of the code I'm trying to run it on (it should look familiar). How would I implement the maximize() method to get this working properly. Any help would be greatly appreciated.
 

#includes:
require 'watir' # the watir controller
include Watir

site = 'http://whatever.com/test.jsp'

def logInMethod(site)
 #open the IE browser
 ie = IE.new
 puts "## Beginning of test: Text Check"
 puts " "

 puts "Step 1: go to the test site: " + site
 ie.goto(site)
 puts    "Action: entered " + site + "in the address bar."
end


logInMethod(site)

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

Reply via email to