Sean,
 
I don't think you were really looking at the code ... notice that the "click" action only happens after simply testing the existance of text within the page...
 
So, extending the example to a small test suite ... It can see things fine.  Anything that IE can do, WATiR can.
 
--SCRIPT--

require 'test/unit'
require 'watir'

class MyTest < Test::Unit::TestCase
 include Watir

 def setup
  @ie = IE.new
  @ie.goto( "instant.search.yahoo.com" )
 end
 
 def teardown
  @ie.close
  sleep( 5 )
 end
 
 def test_one
  assert( @ie.contains_text( "Ruby Home Page" ) == nil )
  @ie.text_field( :name, "p" ).set "ruby"
  assert( @ie.link( :text, "Ruby Home Page" ) )
 end
 
 def test_two
  assert( @ie.contains_text( "Forecast" ) == nil )
  @ie.text_field( :name, "p" ).set "boston weather"
  assert( @ie.link( :text, /Forecast/ ) )
 end
end

--SCRIPT--

... I hope that helps...
 
j.
 


 
On 9/27/05, Sean Gallagher <[EMAIL PROTECTED]> wrote:
No, that does not answer my question.

I am looking to test updates to the page from the Ajax engine. In the case
of instant search, I need to be able to test that when I type "ruby" into
the form field, the browser is updated and shows the link for "Ruby Home
Page" without clicking the button and submitting the form. (try typing that
manually in the browser and you will see what I mean)

I do not think that Watir can "see" this type of change...(?)

-sean
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to