Watir-Classic or Watir-Webdriver?

If Watir-Classic check this link https://github.com/watir/watir-classic
Does classic work with chrome?

Here's a sample browser method using watir-webdriver

require 'watir-webdriver'

def method_OpenBrowser(ie,sURL,sBrowserType) 
  puts ' * method_OpenBrowser' 
  puts ' - Browser type: ' + sBrowserType.to_s 
  puts ' - URL: ' + sURL.to_s
  sProgramTitle='Program Name' 
  iFail=0
  case sBrowserType 
    when 'firefox' 
      ie = Watir::Browser.new(:firefox) 
      ie.window.maximize()
    when 'chrome' 
      ie = Watir::Browser.new(:chrome)
      ie.window.maximize()
      sleep 4
    when 'ie' 
      ie = Watir::Browser.new(:ie) 
      ie.window.maximize()
    else 
      puts ' - FAIL. Browser type not found [ '+sBrowserType+' ]' 
      puts ' - Valid browser types: firefox, chrome, ie' 
      puts ' - ABORT. ' 
      30.times { puts ' ' }
      STDOUT.flush()
      exit
  end 
  ie.goto(sURL) 
  puts ' - PASS: URL Opened'
  puts ' - Return hwnd: '+ie.to_s 
  return ie
rescue 
  puts ' - Rescue Login Failure. Abort!'
  iFail= -1
  puts ' - Return Fail = '+iFail.to_s 
  STDOUT.flush
  return iFail
end 


method_OpenBrowser(ie,sURL='http://www/google.com','chrome') 



On Thursday, January 16, 2014 2:02:06 AM UTC-6, Priti Fhuse wrote:
>
> i fetch chrome by
> system('start http://www.google.com')  coz browser = Watir::Browser.new 
> :chrome not works on my machine
> this line in watir 
> but how to write further script
>
> 1> i want to click in chrome 
> 2>
>

-- 
-- 
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]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to