public
Description: Watir for Safari
Homepage: http://wiki.openqa.org/display/WTR/SafariWatir
Clone URL: git://github.com/redsquirrel/safariwatir.git
Click here to lend your support to: safariwatir and make a donation at www.pledgie.com !
name age message
file .gitignore Mon Oct 19 12:39:05 -0700 2009 Added .idea directory to .gitignore. [richardlawrence]
file History.txt Wed Oct 21 13:04:49 -0700 2009 Fixed date [tcopeland]
file README.rdoc Sun Oct 25 15:57:41 -0700 2009 Changed to reflect github :) [charley]
file Rakefile Wed Oct 21 14:26:34 -0700 2009 Oops, I didn't use echoe, just build the gem wi... [tcopeland]
directory lib/ Sun Oct 25 15:16:06 -0700 2009 adding map and area, still a lot of work but in... [charley]
file safariwatir.gemspec Tue Oct 20 10:53:05 -0700 2009 Prepping for 0.3.7 [tcopeland]
file safariwatir_example.rb Sat Feb 14 12:30:14 -0800 2009 Moving code to lib/ and adding Watir::Exception... [caius]
README.rdoc

"There’s something eerily tingly about seeing a browser run by itself." twitter.com/swombat/status/1280692921

SafariWatir

DESCRIPTION:

We are putting Watir on Safari. The original Watir (Web Application Testing in Ruby) project supports only IE on Windows. This project aims at adding Watir support for Safari on the Mac.

Requirements

Mac OS X running Safari. Some features require you to turn on "Enable access for assistive devices" in System Preferences > Universal Access.

SYNOPSIS:

  require 'rubygems'
  require 'safariwatir'

  browser = Watir::Safari.new
  browser.goto("http://google.com")
  browser.text_field(:name, "q").set("obtiva")
  browser.button(:name, "btnI").click
  puts "FAILURE" unless browser.contains_text("software")

INSTALL:

  [sudo] gem install safariwatir

 or

  git clone git://github.com/redsquirrel/safariwatir.git
  cd safariwatir
  rake install

RUNNING SAFARIWATIR AGAINST WATIR’S CORE TESTS

  # First, install the SafariWatir gem (see above)
  git clone git://github.com/bret/watir.git
  cd watir/watir    #into your cloned directory
  cp unittests/options.yml.example unittests/options.yml
  # Edit unittests/options.yml and set browser: safari
  ruby unittests/core_tests.rb