Ok, interpreting Pierre's example, I can come up with the code below. 
However, this always fails.  I assume I'm doing something somewhat
wrong here, but I don't quite understand what.


#---------- BEGIN

require 'Watir' # the watir controller
include Watir

# Search for text in the HTML of a page
def search_html(string)
        puts "   searching the source for " + string
        begin
                assert_match(string,$ie.html())
                puts "   ok -- found " + string
        rescue => e
                puts ">>>FAIL -- could not find " + string
        end
end

$ie = Watir::IE.start("http://example.com";)

search_html(".")

# ------------ END

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

Reply via email to