1 package com.atlassian.webdriver;
2
3 import com.atlassian.pageobjects.TestedProduct;
4 import com.atlassian.webdriver.pageobjects.WebDriverTester;
5 import com.google.common.base.Supplier;
6
7
8
9
10
11
12 public final class Drivers
13 {
14
15 private Drivers()
16 {
17 throw new AssertionError("Don't instantiate me");
18 }
19
20
21 public static Supplier<AtlassianWebDriver> fromProduct(final TestedProduct<? extends WebDriverTester> product)
22 {
23 return new Supplier<AtlassianWebDriver>()
24 {
25 @Override
26 public AtlassianWebDriver get()
27 {
28 return product.getTester().getDriver();
29 }
30 };
31 }
32 }