From: Sat nosur Date: 2011-09-30T20:25:45+09:00 Subject: How to write a text in red color Hi All, I am directing my script output to the file by executing the script through DOS prompt like test.rb > results.txt. My question is how do I write test case failed puts statement in red color? is there any WATIR/ruby method available? ex: script My aim is write this text in red color in the following method puts "Test Failed! Could not find: #{val}" def Set(ie,id,val) writeln 'SET - ' + id + ' ' + val $ie.text_field(:id, id).set(val) if id == 'username' puts "Test Passed. Found the test string: #{id}. " elsif id == 'password' puts "Test Passed. Found the test string: #{id}. " elsif $ie.contains_text(val) puts "Test Passed. Found the test string: #{val}. " else puts "Test Failed! Could not find: #{val}" end end -- Posted via http://www.ruby-forum.com/.