On 13/07/07, marekj wrote:

This looks like fun with encoding.


[snip]

Paul suggested to use the actual entity in the assertion. I tried it and it
doesn't work for me. I get false.


It works for me.  I created a ruby script as follows:
-----
# Look for the copyright symbol on a page
require 'watir'
require 'test/unit'

class Test_scratch < Test::Unit::TestCase
   def setup
       $ie = Watir::IE.new
       $ie.goto( 'http://www.google.com' )
   end

   def test_copyright
       assert( $ie.text.include?("(c)") )
   end

end # o' class
----

When I run the script I get the following output:
----
C:\temp>ruby scratch_copyright_symbol_check.rb
Loaded suite scratch_copyright_symbol_check
Started
.
Finished in 0.734 seconds.

1 tests, 1 assertions, 0 failures, 0 errors
----

I don't know about you, but that looks like success to me.  If you run the
script above against the Google page, does it fail for you?

Paul C.


(P.S., please remember to CC: the googlegroups address so we can start
moving away from the old rubyforge mailing list.  Thanks.)
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to