From: Joel Pearson Date: 2012-10-17T17:21:10+09:00 Subject: Re: Some warnings Watir webdriver/selenium/fork ajay paswan wrote in post #1080101: > Joel Pearson wrote in post #1080049: >> ajay paswan wrote in post #1079985: >>> Joel Pearson wrote in post #1079295: >>>> If you want to temporarily suppress warnings you can try this: >>>> http://eddymulyono.livejournal.com/65791.html >>> This is supressing stdout, not warnings only!! :( >> >> Suppress stdout until the errors have passed, then restore it. > Did not get you, kindly put some more light on it Actually I just tried that, and webdriver seems to be ignoring the console redirect, it's still outputting to the console even when it shouldn't be. This doesn't work, although as far as I can see it should: _____________________________________________________ orig_std_out = STDOUT.clone #Make a record of the default console output $stdout.reopen("Rubylog.txt", "w") #Create / overwrite logfile $stdout.sync = true #Allow interception of console output $stderr.reopen($stdout) #Pass errors to logfile require 'watir-webdriver' puts('goes to file') b = Watir::Browser.new #This generates a log from the driver # restore stdout $stdout = orig_std_out puts('goes to stdout') b.close _____________________________________________________ -- Posted via http://www.ruby-forum.com/.