Class DriverJar
- java.lang.Object
-
- com.microsoft.playwright.impl.driver.Driver
-
- com.microsoft.playwright.impl.driver.jar.DriverJar
-
public class DriverJar extends Driver
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.file.PathdriverTempDir(package private) static java.lang.StringPLAYWRIGHT_NODEJS_PATHprivate static java.lang.StringPLAYWRIGHT_SKIP_BROWSER_DOWNLOADprivate java.nio.file.PathpreinstalledNodePathprivate static java.lang.StringSELENIUM_REMOTE_URL
-
Constructor Summary
Constructors Constructor Description DriverJar()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.nio.file.PathdriverDir()(package private) voidextractDriverToTempDir()static java.net.URIgetDriverResourceURI()private java.nio.file.FileSysteminitFileSystem(java.net.URI uri)protected voidinitialize(java.lang.Boolean installBrowsers)private voidinstallBrowsers(java.util.Map<java.lang.String,java.lang.String> env)private static booleanisExecutable(java.nio.file.Path filePath)private java.net.URImaybeExtractNestedJar(java.net.URI uri)private static java.lang.StringplatformDir()-
Methods inherited from class com.microsoft.playwright.impl.driver.Driver
createAndInstall, createProcessBuilder, driverPath, ensureDriverInstalled, logMessage
-
-
-
-
Field Detail
-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
private static final java.lang.String PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
- See Also:
- Constant Field Values
-
SELENIUM_REMOTE_URL
private static final java.lang.String SELENIUM_REMOTE_URL
- See Also:
- Constant Field Values
-
PLAYWRIGHT_NODEJS_PATH
static final java.lang.String PLAYWRIGHT_NODEJS_PATH
- See Also:
- Constant Field Values
-
driverTempDir
private final java.nio.file.Path driverTempDir
-
preinstalledNodePath
private java.nio.file.Path preinstalledNodePath
-
-
Method Detail
-
initialize
protected void initialize(java.lang.Boolean installBrowsers) throws java.lang.Exception- Specified by:
initializein classDriver- Throws:
java.lang.Exception
-
installBrowsers
private void installBrowsers(java.util.Map<java.lang.String,java.lang.String> env) throws java.io.IOException, java.lang.InterruptedException- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
isExecutable
private static boolean isExecutable(java.nio.file.Path filePath)
-
initFileSystem
private java.nio.file.FileSystem initFileSystem(java.net.URI uri) throws java.io.IOException- Throws:
java.io.IOException
-
getDriverResourceURI
public static java.net.URI getDriverResourceURI() throws java.net.URISyntaxException- Throws:
java.net.URISyntaxException
-
extractDriverToTempDir
void extractDriverToTempDir() throws java.net.URISyntaxException, java.io.IOException- Throws:
java.net.URISyntaxExceptionjava.io.IOException
-
maybeExtractNestedJar
private java.net.URI maybeExtractNestedJar(java.net.URI uri) throws java.net.URISyntaxException- Throws:
java.net.URISyntaxException
-
platformDir
private static java.lang.String platformDir()
-
-