log4j.rootLogger=WARN, stdout, R
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss} %-5p [%c] %m.%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=D://logs/application.log
log4j.appender.R.MaxFileSize=10MB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
#log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
log4j.appender.R.layout.ConversionPattern=%d{HH:mm:ss} %-5p [%c] %m.%n
log4j.logger.com.sree=DEBUG
#log4j.logger.org.hibernate.SQL=INFO
#log4j.logger.org.springframework=WARN
import org.apache.log4j.Logger;
import org.openqa.selenium.server.SeleniumServer;
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.SeleneseTestCase;
import com.thoughtworks.selenium.Selenium;
public class seleniumclass extends SeleneseTestCase{
private static final String BASE_URL = "http://192.168.128.13/humanet/homepage.asp?sub=1";
static Logger logger = Logger.getLogger(seleniumclass.class);
private Selenium selenium =
new DefaultSelenium("localhost", 4444, "*firefox", BASE_URL);
private SeleniumServer seleniumServer;
public void start() throws Exception {
// start the selenium server
logger.warn("______________________________________________________________");
logger.warn("Initializing Selenium...");
seleniumServer = new SeleniumServer();
seleniumServer.start();
selenium.start();
selenium.windowFocus();
selenium.windowMaximize();
logger.warn("Selenium server Started");
}
No comments:
Post a Comment