Class DriverStorage


  • public final class DriverStorage
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void clearDriverMap()
      clears the drivers
      static java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​org.openqa.selenium.WebDriver>> getAllDriversPerTestMethod()
      Get all EventFiringDrivers of all executed TestMethods
      static org.openqa.selenium.WebDriver getDriverByTestMethodName​(java.lang.String testMethodName, java.lang.String threadName)
      Get an existing EventFiringDriver for an existing testMethodName and threadName
      static void removeSpecificDriver​(java.lang.String testMethodName)
      removes specific drivers from test method
      static void saveDriverForTestMethod​(org.openqa.selenium.WebDriver driver, java.lang.String threadName, java.lang.String testMethodName)
      save the existing EventFiringDriver for the existing Testmethodname and ThreadName in a SynchronizedMap
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • saveDriverForTestMethod

        public static void saveDriverForTestMethod​(org.openqa.selenium.WebDriver driver,
                                                   java.lang.String threadName,
                                                   java.lang.String testMethodName)
        save the existing EventFiringDriver for the existing Testmethodname and ThreadName in a SynchronizedMap
        Parameters:
        driver - .
        threadName - .
        testMethodName - .
      • getDriverByTestMethodName

        public static org.openqa.selenium.WebDriver getDriverByTestMethodName​(java.lang.String testMethodName,
                                                                              java.lang.String threadName)
        Get an existing EventFiringDriver for an existing testMethodName and threadName
        Parameters:
        testMethodName - .
        threadName - .
        Returns:
        webdriver
      • getAllDriversPerTestMethod

        public static java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​org.openqa.selenium.WebDriver>> getAllDriversPerTestMethod()
        Get all EventFiringDrivers of all executed TestMethods
        Returns:
        drivers per test method
      • removeSpecificDriver

        public static void removeSpecificDriver​(java.lang.String testMethodName)
        removes specific drivers from test method
        Parameters:
        testMethodName - .
      • clearDriverMap

        public static void clearDriverMap()
        clears the drivers