1 package com.atlassian.webdriver;
2
3 import com.atlassian.webdriver.browsers.AutoInstallConfiguration;
4 import com.atlassian.webdriver.testing.rule.WebDriverScreenshotRule;
5 import org.junit.After;
6 import org.junit.AfterClass;
7 import org.junit.BeforeClass;
8 import org.junit.Rule;
9 import org.slf4j.Logger;
10 import org.slf4j.LoggerFactory;
11
12
13
14
15
16
17
18
19 @Deprecated
20 public abstract class AtlassianWebDriverTestBase
21 {
22 private static final Logger log = LoggerFactory.getLogger(AtlassianWebDriverTestBase.class);
23
24 protected static AtlassianWebDriver driver;
25
26 @Rule
27 public WebDriverScreenshotRule rule = new WebDriverScreenshotRule();
28
29 @After
30 public void tearDown() {
31 if (driver != null) {
32 driver.manage().deleteAllCookies();
33 }
34 }
35
36 @BeforeClass
37 public static void startUp() {
38 driver = WebDriverFactory.getDriver(AutoInstallConfiguration.setupBrowser());
39 }
40
41 @AfterClass
42 public static void cleanUp() throws Exception {
43 log.debug("Cleaning up driver {}", driver);
44 driver.quit();
45 driver = null;
46 }
47 }