I just ran your code fro mirb using watir 1.4.1 and it only printed it once....

----- Original Message -----
From: mihai <[EMAIL PROTECTED]>
Date: Tuesday, June 12, 2007 11:12 am
Subject: [Wtr-general] $ie.text.include? problem

> 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
> _______________________________________________
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
> 
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to