Why don't we specify the complete path of browser log file in System.setProperty | Selenium Forum
P
Pravin V. Kumbhare Posted on 25/08/2020

To generate the browser logs in a separate file in the folder project dir\logs, the command used in the training video is as below:

System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, "logs\\firefoxlog.log");

Here, just the name of folder is specified, instead of complete path. 

Why don't we specify the complete path here as below?

System.getProperty("user.dir"+"\\logs\\"+firefoxlog.log)

 

Thank you!


A
Ashish Replied on 27/08/2020

When you are writing this line in a file present inside project then it automatically takes a relative path 


Related Posts