Does anyone know how I can save the html output without these extra line feed characters? I am using Watir 1.4.1.
Here is the calling script code:
---
if ie.contains_text('Server Error')
create_exception_report( ie.html )
end
---
Here is a snippet of the method code that writes the output:
---
def create_exception_report( html_content )
# A nasty Server Error has occurred. Open a file to capture the results:
f_e = File.new(filename, "w")
[snip]
f_e.puts '=> ERROR DETAILS:'
f_e.puts '-----------------'
f_e.puts html_content # <- ** line of interest **
f_e.puts ''
# Close the file
f_e.close
end
---
Here is a sample of the txt file output viewed in a text editor (not NotePad):
---
=> ERROR DETAILS:
-----------------
<BODY bgColor=white><SPAN>
<H1>Server Error in '/ServerName' Application.
<HR width="100%" color=silver SIZE=1>
</H1>
---
What I was expecting:
---
=> ERROR DETAILS:
-----------------
<BODY bgColor=white><SPAN>
<H1>Server Error in '/ServerName' Application.
<HR width="100%" color=silver SIZE=1>
</H1>
---
Any Suggestions? Is there an alternate command that I can use to write the html output to file? Perhaps I can scrub the html content to remove these control characters?
Paul.
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
