Right now I am doing some screen scraping of a site. I want to be able to format the data properly in the txt file, but can't seem to get it to work. The end result that I want is this:
text1, text2, text3
text4, text5, text6
So 3 items would be printed out, the 1st two with a comma after each, then the last one with no comma and go to the next line.
Right now my code below produces this:
text1, text2, text3, text4, text5, text6,
Any thoughts or suggestions would be appreciated!
// Output a message to the log so we know that we'll be writing the text out to a file.
session.log( "Writing data to a file." );
// Create a FileWriter object that we'll use to write out the text.
out = new FileWriter( "form_submitted_text.txt", true );
// Write out the text.
out.write( session.getVariable( "Identifier" ) );
out.write (", ");
// Close the file.