RAutomation worked well :)
I could not get the handle method to work. How do I get the handle
using watir-webdriver
A quick refactor
require 'watir-webdriver'
require 'rautomation'
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)
when 'chrome'
ie = Watir::Browser.new(:chrome)
when 'ie'
ie = Watir::Browser.new(:ie)
else
puts ' - FAIL. Browser type not found [ '+sBrowserType+' ]'
puts ' - Valid browser types: firefox, chrome, ie'
puts ' - ABORT. '
exit
end
ie.goto(sURL)
RAutomation::Window.new(:title => sURL).maximize
...... the rest of the method .....
end
On Feb 14, 8:36 am, Jarmo Pertman <[email protected]> wrote:
> It's RAutomation::Window#maximize and it would work only under
> Windows. Also, i'd use window handle instead of title:
> RAutomation::Window.new(:hwnd => hwnd).minimize
> RAutomation::Window.new(:hwnd => hwnd).maximize
>
> Jarmo Pertman
> -----
> IT does really matter -http://itreallymatters.net
>
--
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]