October 2018
Intermediate to advanced
192 pages
5h 12m
English
For implementing logging in the framework, define the log object in the TestBase class, as shown here:
protected static Logger log = null;
Mark the AActionKeyword class as shown here:
public class AActionKeyword extends TestBase implements IActionKeyword
Then initialize the logger object in the OpenBrowser constructor using the following code:
log = Logger.getLogger(OpenBrowser.class); PropertyConfigurator.configure("log4j.properties");
With this, we can incorporate the log4j logs in the OpenBrowser class, as shown here:
public class OpenBrowser extends AActionKeyword { public OpenBrowser() throws IOException, FilloException { super(); log = Logger.getLogger(OpenBrowser.class); PropertyConfigurator.configure("log4j.properties"); ...Read now
Unlock full access