I'm trying to save the whole html page with getBodyText into a String and then write it to a file (.txt). However when I check the file, it's empty. Here's my code:
String store_report = selenium.getBodyText();
File f = new File("C:/folder/" + "report" + ".txt");
FileWriter writer = new FileWriter(f);
writer.append(store_report);
System.out.println("Report Created is in Location : " + f.getAbsolutePath());