Example #1
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());
 }
 private long getLocatorTimeout() {
   if (StepEventBus.getEventBus().aStepInTheCurrentTestHasFailed()
       || (MethodTiming.forThisThread().isInQuickMethod())) {
     return 0;
   } else {
     return TimeUnit.SECONDS.convert(implicitTimeoutInMilliseconds, TimeUnit.MILLISECONDS);
   }
 }
Example #3
0
 private void notifyScreenChange() {
   StepEventBus.getEventBus().notifyScreenChange();
 }
 protected boolean driverIsDisabled() {
   return StepEventBus.getEventBus().webdriverCallsAreSuspended();
 }
 protected void notifyScreenChange() {
   StepEventBus.getEventBus().notifyScreenChange();
 }
Example #6
0
 private boolean isEnabled() {
   return !StepEventBus.getEventBus().webdriverCallsAreSuspended();
 }
 @Step
 public void step_with_screen_changes() {
   StepEventBus.getEventBus().notifyScreenChange();
 }
Example #8
0
 public static void takeScreenshot() {
   StepEventBus.getEventBus().takeScreenshot();
 }