Пример #1
0
  public static SessionMap<Object, Object> getCurrentSession() {

    if (testSessionThreadLocal.get() == null) {
      testSessionThreadLocal.set(new TestSessionVariables());
    }
    return testSessionThreadLocal.get();
  }
Пример #2
0
 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());
 }
Пример #3
0
 public static void useFirefoxProfile(FirefoxProfile profile) {
   firefoxProfileThreadLocal.set(profile);
 }
Пример #4
0
 private static void setupWebdriverManager(WebdriverManager webdriverManager) {
   webdriverManagerThreadLocal.set(webdriverManager);
 }
Пример #5
0
 private static void initStepFactoryUsing(final Pages pagesObject) {
   StepFactory stepFactory = new StepFactory(pagesObject);
   stepFactoryThreadLocal.set(new StepFactory(pagesObject));
 }
Пример #6
0
 private static void initPagesObjectUsing(final WebDriver driver) {
   pagesThreadLocal.set(new Pages(driver));
 }
Пример #7
0
 private static void setupWebDriverFactory() {
   factoryThreadLocal.set(Injectors.getInjector().getInstance(WebDriverFactory.class));
 }