[Wtr-general] $ie.text.include? problem

mihai forum-watir-users at openqa.org
Tue Jun 12 13:12:34 EDT 2007


i have this code:

testSite = 'http://www.google.com'
$ie = IE.new
$ie.goto(testSite)

if $ie.text.include?("Programs")  
    then puts "OK"
      else puts "CRAP"
      end
      
  
end

and the output: 
OK
OK
OK

why does 3 OK appears? how can i do that only one OK appear and how can i write the code for, example,: 

if strings "Microsoft" and "Programs" and "OK" are in $ie.text puts OK


More information about the Wtr-general mailing list