Class Driver
- java.lang.Object
-
- com.microsoft.playwright.impl.driver.Driver
-
public abstract class Driver extends Object
This class provides access to playwright-cli. It can be either preinstalled in the host system and its path is passed as a system property or it can be loaded from the driver-bundle module if that module is in the classpath.
-
-
Constructor Summary
Constructors Constructor Description Driver()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static DrivercreateAndInstall(Map<String,String> env, Boolean installBrowsers)ProcessBuildercreateProcessBuilder()abstract PathdriverDir()static DriverensureDriverInstalled(Map<String,String> env, Boolean installBrowsers)protected abstract voidinitialize(Boolean installBrowsers)protected static voidlogMessage(String message)
-
-
-
Field Detail
-
PLAYWRIGHT_NODEJS_PATH
public static final String PLAYWRIGHT_NODEJS_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
ensureDriverInstalled
public static Driver ensureDriverInstalled(Map<String,String> env, Boolean installBrowsers)
-
initialize
protected abstract void initialize(Boolean installBrowsers) throws Exception
- Throws:
Exception
-
createProcessBuilder
public ProcessBuilder createProcessBuilder()
-
createAndInstall
public static Driver createAndInstall(Map<String,String> env, Boolean installBrowsers)
-
driverDir
public abstract Path driverDir()
-
logMessage
protected static void logMessage(String message)
-
-