Пример #1
0
 /**
  * Initialise the screenshot capture and link to issue/test case id
  *
  * @param testMethod - Test method passed from the test script
  */
 private static void initialiseNewScreenshotCapture(Method testMethod) {
   if (ScreenshotCapture.isRequired()) {
     String testID = "n/a";
     try {
       testID = testMethod.getName();
     } catch (NullPointerException e) {
       logger.debug("No test method defined.");
     }
     try {
       testID = testMethod.getAnnotation(Issue.class).value();
     } catch (NullPointerException e) {
       logger.debug("No Issue defined.");
     }
     try {
       testID = testMethod.getAnnotation(TestCaseId.class).value();
     } catch (NullPointerException e) {
       logger.debug("No Test Case ID defined.");
     }
     capture.set(new ScreenshotCapture(testID, driverType.get().getDriver()));
   }
 }
Пример #2
0
 /** Ran as part of the initialiseDriverObject, configures parts of the driver */
 private static void configureDriverBasedOnParams() {
   requiresReset.set(driverType.get().resetBrowser(requiresReset.get()));
   driverType.get().maximiseBrowserWindow();
   setUserAgent();
 }