View Javadoc

1   package com.atlassian.webdriver.browsers;
2   
3   import com.atlassian.browsers.BrowserConfiguration;
4   import com.atlassian.browsers.BrowserType;
5   
6   import java.io.File;
7   
8   /**
9    * A default BrowserConfiguration that reads the specific browser from System properties 
10   * and uses the maven 'target' directory as a tmp dir to install the driver in if auto-installing it.
11   */
12  public class WebDriverBrowserConfiguration implements BrowserConfiguration
13  {
14      private final File targetDir = new File("target");
15      private final File webdriverDir = new File(targetDir, "webdriverTmp");
16  
17      public WebDriverBrowserConfiguration()
18      {}
19  
20      public File getTmpDir()
21      {
22          return webdriverDir;
23      }
24  
25      public String getBrowserName()
26      {
27          return System.getProperty("webdriver.browser", BrowserType.FIREFOX.getName());
28      }
29  }