Package com.vaadin.testbench.parallel
Class BrowserUtil
- java.lang.Object
-
- com.vaadin.testbench.parallel.BrowserUtil
-
public class BrowserUtil extends Object
Provides helper method for selecting the browser to run on
-
-
Constructor Summary
Constructors Constructor Description BrowserUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.openqa.selenium.remote.DesiredCapabilitieschrome()Gets the capabilities for Chromestatic org.openqa.selenium.remote.DesiredCapabilitiesedge()Gets the capabilities for Edgestatic org.openqa.selenium.remote.DesiredCapabilitiesfirefox()Gets the capabilities for Firefoxstatic TestBenchBrowserFactorygetBrowserFactory()Gets the BrowserFactory used to generate new DesiredCapabilitiesstatic StringgetBrowserIdentifier(org.openqa.selenium.Capabilities capabilities)Returns a human readable identifier of the given browser.static StringgetPlatform(org.openqa.selenium.Capabilities capabilities)Returns a human readable identifier of the platform described by the given capabilities.static booleanisChrome(org.openqa.selenium.Capabilities capabilities)static booleanisEdge(org.openqa.selenium.Capabilities capabilities)static booleanisFirefox(org.openqa.selenium.Capabilities capabilities)static booleanisSafari(org.openqa.selenium.Capabilities capabilities)static org.openqa.selenium.remote.DesiredCapabilitiessafari()Gets the capabilities for Safari
-
-
-
Method Detail
-
safari
public static org.openqa.selenium.remote.DesiredCapabilities safari()
Gets the capabilities for Safari- Returns:
- an object describing the capabilities required for running a test on Safari
-
chrome
public static org.openqa.selenium.remote.DesiredCapabilities chrome()
Gets the capabilities for Chrome- Returns:
- an object describing the capabilities required for running a test on Chrome
-
firefox
public static org.openqa.selenium.remote.DesiredCapabilities firefox()
Gets the capabilities for Firefox- Returns:
- an object describing the capabilities required for running a test on Firefox
-
edge
public static org.openqa.selenium.remote.DesiredCapabilities edge()
Gets the capabilities for Edge- Returns:
- an object describing the capabilities required for running a test on Edge
-
isEdge
public static boolean isEdge(org.openqa.selenium.Capabilities capabilities)
- Parameters:
capabilities- The capabilities to check- Returns:
- true if the capabilities refer to Edge, false otherwise
-
isChrome
public static boolean isChrome(org.openqa.selenium.Capabilities capabilities)
- Parameters:
capabilities- The capabilities to check- Returns:
- true if the capabilities refer to Chrome, false otherwise
-
isSafari
public static boolean isSafari(org.openqa.selenium.Capabilities capabilities)
- Parameters:
capabilities- The capabilities to check- Returns:
- true if the capabilities refer to Safari, false otherwise
-
isFirefox
public static boolean isFirefox(org.openqa.selenium.Capabilities capabilities)
- Parameters:
capabilities- The capabilities to check- Returns:
- true if the capabilities refer to Firefox, false otherwise
-
getBrowserIdentifier
public static String getBrowserIdentifier(org.openqa.selenium.Capabilities capabilities)
Returns a human readable identifier of the given browser. Used for test naming and screenshots- Parameters:
capabilities- to obtain the browser identifier from- Returns:
- a human readable string describing the capabilities
-
getPlatform
public static String getPlatform(org.openqa.selenium.Capabilities capabilities)
Returns a human readable identifier of the platform described by the given capabilities. Used mainly for screenshots- Parameters:
capabilities- to obtain the platform from- Returns:
- a human readable string describing the platform
-
getBrowserFactory
public static TestBenchBrowserFactory getBrowserFactory()
Gets the BrowserFactory used to generate new DesiredCapabilities- Returns:
- BrowserFactory used to generate new DesiredCapabilities
-
-