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");
}
static RemoteWebDriver driver;
static DesiredCapabilities...