Hello I'm having a slight issue. I'm using selenium to make a report through ExtentReport which saves a HTML file. I want to be able to save this file dynamically.
This is the code im currently using.
report = new ExtentReports("/Users/xxxx/Desktop/ExtentReport/ExtentReport.html" + System.currentTimeMillis());
Adding System.CurrentTimeMills kind of works as it saves it but it ends up being ExtentReport.html1919191919191919191 which works.
The problem that I have is that after I run my selenium test I want it to navigate to the folder and open the HTML as soon as the test is over.
If I use currentTime then I can't open the file as it is made and called about a minute inbetween giving different file names.
This is the code I use to call it after the test is over.
String Path ="file:/Users/xxxxx/Desktop/ExtentReport/ExtentReport.html" + System.currentTimeMillis(); driver.get(Path);
How can I save my html file dynamically whilst still being able to call it later on during my script to open?