Logger

It will generate the logs in 2 different ways.


1. General log, which will generate the log with the predefined name i.e. “ProgramExecution.log”. You can use this with stand alone program (i.e. without TestNg). And you can specify the location of the log using Mobile Settings.


Syntax :

Settings.Mobile.setLogFilePath("logFilePath");
s.Logger.Message("message");

2. Test Specific log, which will generate the log with package name and test name. This will only works with TestNg in Java. And you can specify the location of the log using Web Settings. For C# no need to write the initLogs() method. You can directly use the Message and Debug methods.


Syntax :

s.Logger.initLogs(this.getClass());

Need to assign the above statement once per class and then use the below method to log the message into the log file.


Syntax :

Settings.Mobile.setLogFilePath("logFilePath");
s.Logger.Debug("message");