Class BrowsersDataProvider


  • public final class BrowsersDataProvider
    extends Object
    Handles the connection to a Selenium Grid/Standalone Nodes to all classes with the Factory annotation in the constructor
    • Constructor Detail

      • BrowsersDataProvider

        public BrowsersDataProvider()
    • Method Detail

      • availableBrowsers

        @DataProvider(parallel=true)
        public static Object[] availableBrowsers​(org.testng.ITestContext context,
                                                 Constructor<?> testConstructor)
                                          throws Exception
        Get the browsers available in a selenium grid.
        Parameters:
        context - context
        testConstructor - testConstructor
        Returns:
        an iterator
        Throws:
        Exception - exception
      • availableUniqueBrowsers

        @DataProvider(parallel=true)
        public static Object[] availableUniqueBrowsers​(org.testng.ITestContext context,
                                                       Constructor<?> testConstructor)
                                                throws Exception
        Get unique browsers available in a selenium grid.
        Parameters:
        context - context
        testConstructor - testConstructor
        Returns:
        an iterator
        Throws:
        Exception - exception
      • availableIOSBrowsers

        @DataProvider(parallel=true)
        public static Object[] availableIOSBrowsers​(org.testng.ITestContext context,
                                                    Constructor<?> testConstructor)
                                             throws Exception
        Get the browsers available with "iOS" as platformName in a selenium grid.
        Parameters:
        context - context
        testConstructor - testConstructor
        Returns:
        an iterator
        Throws:
        Exception - Exception
      • availableMobileBrowsers

        @DataProvider(parallel=true)
        public static Object[] availableMobileBrowsers​(org.testng.ITestContext context,
                                                       Constructor<?> testConstructor)
                                                throws Exception
        Get the browsers available with "Android" or "iOS" as platformName in a selenium grid.
        Parameters:
        context - context
        testConstructor - testConstructor
        Returns:
        an iterator
        Throws:
        Exception - the exception