http://logging.apache.org/log4j/2.x/manual/configuration.html
Inserting log requests into the application code requires a fair amount of planning and effort. Observation shows that approximately 4 percent of code is dedicated to logging. Consequently, even moderately sized applications will have thousands of logging statements embedded within their code. Given their number, it becomes imperative to manage these log statements without the need to modify them manually.
Configuration of Log4j 2 can be accomplished in 1 of 4 ways:
https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#javadoctags
/** * Returns an Image object that can then be painted on the screen. * The url argument must specify an absolute {@link URL}. The name * argument is a specifier that is relative to the url argument. * <p> * This method always returns immediately, whether or not the * image exists. When this applet attempts to draw the image on * the screen, the data will be loaded.
import java.io.FileInputStream; import java.io.FileOutputStream; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.firefox.FirefoxProfile; import org.openqa.selenium.firefox.internal.ProfilesIni;
public class BrowserUtils { public static WebDriver driver = null;
public static WebDriver OpenBrowser(){ // Create web driver driver = new FirefoxDriver(); return driver; } //end method }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="Suites" parallel="none"> <listeners> <listener class-name="com.uc.test.selenium.util.Listener"></listener> </listeners> <test name="Simple Test"> <classes> <class name="com.uc.test.selenium.tests.Test_Login"/> </classes> </test> <!-- test name="ALL"> <packages> <package name="com.uc.test.selenium.tests" /> </packages> </test --> </suite> <!-- Suite -->
Copyright 2018· All rights reserved