public static SessionMap<Object, Object> getCurrentSession() { if (testSessionThreadLocal.get() == null) { testSessionThreadLocal.set(new TestSessionVariables()); } return testSessionThreadLocal.get(); }
private static void initStepListener() { Configuration configuration = Injectors.getInjector().getInstance(Configuration.class); File outputDirectory = configuration.getOutputDirectory(); StepListener listener = new BaseStepListener(outputDirectory, getPages()); stepListenerThreadLocal.set(listener); StepEventBus.getEventBus().registerListener(getStepListener()); }
public static FirefoxProfile getFirefoxProfile() { return firefoxProfileThreadLocal.get(); }
public static void useFirefoxProfile(FirefoxProfile profile) { firefoxProfileThreadLocal.set(profile); }
public static StepListener getStepListener() { return stepListenerThreadLocal.get(); }
private static void setupWebdriverManager(WebdriverManager webdriverManager) { webdriverManagerThreadLocal.set(webdriverManager); }
public static StepFactory getStepFactory() { return stepFactoryThreadLocal.get(); }
public static WebdriverManager getWebdriverManager() { return webdriverManagerThreadLocal.get(); }
protected static Pages getPages() { return pagesThreadLocal.get(); }
private static void initStepFactoryUsing(final Pages pagesObject) { StepFactory stepFactory = new StepFactory(pagesObject); stepFactoryThreadLocal.set(new StepFactory(pagesObject)); }
private static void initPagesObjectUsing(final WebDriver driver) { pagesThreadLocal.set(new Pages(driver)); }
private static void setupWebDriverFactory() { factoryThreadLocal.set(Injectors.getInjector().getInstance(WebDriverFactory.class)); }