I'm using webdriver to automate for the big 3 browsers and have the
snippet below to set the screen size to maximum,  Chrome works perfect
with the swtiches option, IE and FF are kind of acceptable hacks.

A) Does anyone have a better way to maximize FF & IE with Webdriver?
B) In Chrome I always get the inline-popup Do you want google chrome
to save your password?.  Is there an elegant way to get rid of that?
Its not a great problem just an annoyance.


def Method_Login(ie,sURL,sBrowserType,sUserName,sPassword)
  puts ' * Method_Login'
  puts ' - Browser type: ' + sBrowserType.to_s
  puts ' - Login: ' + sUserName.to_s
  case sBrowserType
    when 'firefox'
      ie = Watir::Browser.new(:firefox)
      ie.window.move_to(0,0)
      ie.window.resize_to(1024,700)
    when 'chrome'
      ie = Watir::Browser.new(:chrome, :switches => %w[--start-
maximized] )
    when 'ie'
      ie = Watir::Browser.new(:ie)
      ie.window.move_to(0,0)
      ie.window.resize_to(1024,700)
    else
      puts ' - FAIL. Browser type not found [ '+sBrowserType+' ]'
      puts ' - Valid browser types: firefox, chrome, ie'
      puts ' - ABORT. '
      stop
  end
  ie.goto(sURL)
 .... etc...
end

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to