From: TJ Wilkes Date: 2011-05-12T06:04:03+09:00 Subject: Re: Starting Method/Class issues Modified with your suggestion: def tverify(str, ie) puts "\n" puts "Checking for text '#{str}'." print "Actual Result: " if ie.text.include? str puts "Test Passed. Found the string: '#{str}'. Valid" else puts " !ERROR! Test Failed! Could not find: '#{str}'." end end def lifollow(str, ie) puts "\n" puts "Verifying '#{str}'. " print "Actual Result:" if ie.li(:id, str).exist? puts "Found the link: '#{str}'. Following link." ie.li(:id, str).click sleep(1) else puts " !ERROR! Test Failed! Could not find: '#{str}'." end end Thanks for the tip. -- Posted via http://www.ruby-forum.com/.