require 'rubygems'
require 'watir'
browser = Watir::Browser.new :firefox
browser.goto 'http://puppies.herokuapp.com'
browser.button(:value => 'View Details').click
browser.button(:value => 'Adopt Me!').click
browser.button(:value => 'Complete the Adoption').click
browser.text_field(:id => 'order_name').set('Cheezy')
browser.text_field(:id => 'order_address').set('123 Main St')
browser.text_field(:id => 'order_email').set('che...@foo.com')
browser.select_list(:id => 'order_pay_type').select('Check')
browser.button(:value => 'Place Order').click
fail 'Browser text did not match expected value' unless browser.text.include? 'T\
hank you for adopting a puppy!'
The error:
This code has slept for the duration of the default timeout waiting for an Element to exist. If the test is still passing, consider using Element#exists? instead of rescuing UnknownObjectException
/Users/alanbaldwin/.rvm/gems/ruby-2.2.1/gems/watir-6.1.0/lib/watir/elements/element.rb:507:in `rescue in wait_for_exists': timed out after 30 seconds, waiting for {:id=>"order_address", :tag_name=>"input"} to be located (Watir::Exception::UnknownObjectException)
I can click/highlight the order_address text_box but i cant set values within the box.