From: Matthew Moss Date: 2008-10-17T22:50:18+09:00 Subject: Re: Validating multiple contents On Oct 17, 2008, at 12:15 AM, Bala Krishnan wrote: > Hi > If we want to validate result page with single text content we will > use > > ie.text.include?(" Particular content ") > > suppose if i want to validate page with multiple content like > > German rails > NGINX > how to use ruby for this validation? ["German rails", "NGINX"].any? { |str| ie.text.include?(str) } This will return true if any of the strings are found in ie.text. Replace any? with all? to return true only if all of the strings are found.