X hits on this document

PDF document

Web Application Testing in Ruby - page 16 / 34

62 views

0 shares

0 downloads

0 comments

16 / 34

Introduction to Ruby Introduction to WATIR Testing Web Applications

Overview Working with Web Pages Demo

Controlling the Browser

  • #

    Always Load the Watir library at the top of your script

require 'watir'

  • #

    Start IE and navigate to a given URL

ie = Watir::IE.start( 'http://www.google.com' )

  • #

    or, attach to an existing IE window by title or url

ie = Watir::IE.attach( :title, 'Google' ) ie = Watir::IE.attach( :url, /regex matching url/ )

  • #

    Navigate to a different URL

ie.goto( "http://wtr.rubyforge.org" )

  • #

    You can also 'minimize', 'restore', and 'close' IE

ie.close

Paul Carvalho

Web Application Testing in Ruby

Document info
Document views62
Page views62
Page last viewedFri Oct 28 16:32:03 UTC 2016
Pages34
Paragraphs380
Words2437

Comments