Package io.karatelabs.driver.w3c
Enum Class W3cBrowserType
- All Implemented Interfaces:
Serializable,Comparable<W3cBrowserType>,Constable
Enum-driven configuration for all W3C WebDriver browser types.
Encapsulates per-browser differences: executable name, default port,
CLI arg format, and W3C capability browserName.
Matches Karate v1 type names for backward compatibility.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionformatPortArg(int port) Format the port argument for this browser's driver executable.static W3cBrowserTypeGet the W3cBrowserType for a Karate type string.intstatic booleanCheck if a type string corresponds to a W3C WebDriver type.static W3cBrowserTypeReturns the enum constant of this class with the specified name.static W3cBrowserType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CHROMEDRIVER
-
GECKODRIVER
-
SAFARIDRIVER
-
MSEDGEDRIVER
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isW3cType
Check if a type string corresponds to a W3C WebDriver type. -
fromType
Get the W3cBrowserType for a Karate type string.- Returns:
- the browser type, or null if not a W3C type
-
getKarateType
-
getBrowserName
-
getExecutable
-
getDefaultPort
public int getDefaultPort() -
formatPortArg
Format the port argument for this browser's driver executable.
-