Professional Documents
Culture Documents
• Steps:
1. Install Ruby (I’ll be using version: 1.8.6-25)
2. Install WATiR (I’ll be using version: 1.4.1)
– ScITE (Free)
• In the Ruby Windows installer
require ‘watir’
include Watir
ie =
IE.start(“http://www.dukk.org/”)
…
The Watir::IE Class
• This is the heart and sole of WATiR
(from the users point of view)
• Contains all the methods needed to
create, navigate and “probe” the IE
browser window
Demo: Quick lap around
my site
Using Ruby’s Interactive
Command Interpreter (IRB)
Use it to:
• Attach to IE windows and quickly identify
browser objects
• Run quick experiments to see if things will
work in your tests
def setup()
@ie = Watir::IE.start(“http://myapp.com/”)
@ie.link(:text, “Login”).click()
end
def teardown()
@ie.close()
end
Application Data
• I do not recommend trying to
manage the state of your
applications data using the startup
and teardown methods if it can be
avoided!
require ‘firewatir’
include FireWatir
ff =
Firefox.start(“http://www.dukk.org/”)
…
Demo: Quick Demo of
FireWATiR
Questions / Comments?
Contact Information
• Feel free to contact me if you have
questions, comments or suggestions
– Web: http://www.dukk.org/
– Email: dukk@dukk.org
Thanks to our Sponsors