Untitled
unknown
plain_text
2 years ago
1.4 kB
9
Indexable
package initbanking.testcases;
import org.apache.log4j.PropertyConfigurator;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.edge.EdgeDriver;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import freemarker.log.Logger;
public class Baseclass
{
public String baseurl= "https://demo.guru99.com/v4/";
public String userid= "mngr541823";
public String pwd= "YmAgUdA";
public static WebDriver driver;
public static Logger logger;
@BeforeClass
public void setup()
{
System.setProperty("webdriver.Edgedriver.driver", System.getProperty("user.dir")+"Drivers\\msedgedriver.exe");
driver= new EdgeDriver();
driver.manage().window().maximize();
logger= Logger.getLogger("ebanking");
/*
* This is a class in the Log4j library that helps in configuring Log4j programmatically.
* configure("log4j.properties") - This method is used to configure Log4j by loading settings from the specified properties file named log4j.properties.
*This file contains configurations for Log4j such as log levels, log file locations, appenders, and more.
*
*/
PropertyConfigurator.configure("log4j.properties");
}
@AfterClass
public void teardown()
{
driver.quit();
}
}
Editor is loading...
Leave a Comment