0

I wanted to ask if it is possible to print my automated tests' console window to a text file. I'm new to webdriver and java and so far I have got a print out using the code below. Any help would be appreciated, thanks in advance.

FileWriter fw = new FileWriter("c:\\selenium_output_.txt");
fw.write("test");
fw.close();
Rafa
  • 2,328
  • 3
  • 27
  • 44

1 Answers1

1

If your automated tests console writes to System.out, you can redirect System.out to a file using System.setOut. More in this other answer on SO. (You can do the same thing with System.err if it uses that as well.)

Community
  • 1
  • 1
T.J. Crowder
  • 1,031,962
  • 187
  • 1,923
  • 1,875