Module 4.1.2 - Selenium Page Object Design Pattern - Helper Class

From Training Material
Jump to navigation Jump to search
package com.shk.webdriver.sanity;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.junit.*;



public class WebDriverBase 
{
		public static WebDriver driver ;
		
		
		public static final String URL = "http://hotmail.com";
		
			@BeforeClass()
			public static void startDriver()
			{
			    driver = new FirefoxDriver();
			}

		    @After  
	        public void after() {  
	            driver.manage().deleteAllCookies();  
	        }  
	      
	        @Before  
	        public void before() {  
//	            driver.get(host);  
	        	driver.get(URL);
	        }  
	      
		
		
			@AfterClass()
			public static void stopDriver()
			{
				driver.close();
			}
		
		
		
}