Class ElectronDriver
java.lang.Object
org.openqa.selenium.remote.RemoteWebDriver
org.openqa.selenium.chromium.ChromiumDriver
org.openqa.selenium.chrome.ElectronDriver
- All Implemented Interfaces:
HasBiDi, HasCasting, HasCdp, HasLaunchApp, HasNetworkConditions, HasPermissions, HasDevTools, HasFederatedCredentialManagement, HasAuthentication, HasCapabilities, HasDownloads, Interactive, JavascriptExecutor, HasLogEvents, PrintsPage, SearchContext, TakesScreenshot, HasVirtualAuthenticator, WebDriver
A
WebDriver implementation that controls an Electron application running on the local
machine. Driver lifecycle and discovery are managed by ChromeDriverService.
Casting and Chrome DevTools Protocol commands are not supported on Electron sessions.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class RemoteWebDriver
RemoteWebDriver.RemoteTargetLocator, RemoteWebDriver.RemoteWebDriverOptions, RemoteWebDriver.WhenNested classes/interfaces inherited from interface HasDownloads
HasDownloads.DownloadedFileNested classes/interfaces inherited from interface WebDriver
WebDriver.Navigation, WebDriver.Options, WebDriver.TargetLocator, WebDriver.Timeouts, WebDriver.Window -
Field Summary
Fields inherited from class ChromiumDriver
casting, cdp, IS_CHROMIUM_BROWSERFields inherited from class RemoteWebDriver
capabilities -
Constructor Summary
ConstructorsConstructorDescriptionElectronDriver(ChromeDriverService service, ElectronOptions options) ElectronDriver(ChromeDriverService service, ElectronOptions options, ClientConfig clientConfig) ElectronDriver(ElectronOptions options) ElectronDriver(ElectronOptions options, ClientConfig clientConfig) -
Method Summary
Modifier and TypeMethodDescriptionexecuteCdpCommand(String commandName, Map<String, Object> parameters) Execute a Chrome DevTools Protocol command and get returned result.Returns the list of cast sinks (Cast devices) available to the Chrome media router.voidselectCastSink(String deviceName) Selects a cast sink (Cast device) as the recipient of media router intents (connect or play).voidstartDesktopMirroring(String deviceName) Initiates desktop mirroring for the current browser tab on the specified device.voidstartTabMirroring(String deviceName) Initiates tab mirroring for the current browser tab on the specified device.voidstopCasting(String deviceName) Stops casting from media router to the specified device, if connected.Methods inherited from class ChromiumDriver
deleteNetworkConditions, executeScript, getCapabilities, getNetworkConditions, getPinnedScripts, launchApp, maybeGetDevTools, onLogEvent, pin, register, setFileDetector, setNetworkConditions, setPermission, unpinMethods inherited from class RemoteWebDriver
addVirtualAuthenticator, builder, close, deleteDownloadableFiles, downloadFile, execute, execute, execute, executeAsyncScript, executeScript, findElement, findElements, findElements, fireSessionEvent, fireSessionEvent, get, getClientConfig, getCommandExecutor, getCurrentUrl, getDownloadableFiles, getDownloadedFiles, getElementConverter, getErrorHandler, getExecuteMethod, getFederatedCredentialManagementDialog, getFileDetector, getHandle, getPageSource, getScreenshotAs, getSessionId, getTitle, getWindowHandle, getWindowHandles, isDownloadsEnabled, log, manage, maybeGetBiDi, navigate, network, perform, print, quit, removeVirtualAuthenticator, resetCooldown, resetInputState, script, setCommandExecutor, setDelayEnabled, setElementConverter, setErrorHandler, setFoundBy, setLogLevel, setSessionId, startSession, switchTo, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface HasAuthentication
registerMethods inherited from interface HasBiDi
getBiDi, getHandle, maybeGetBiDiMethods inherited from interface HasDevTools
getDevToolsMethods inherited from interface HasDownloads
requireDownloadsEnabled
-
Constructor Details
-
ElectronDriver
-
ElectronDriver
-
ElectronDriver
-
ElectronDriver
public ElectronDriver(ChromeDriverService service, ElectronOptions options, ClientConfig clientConfig)
-
-
Method Details
-
getCastSinks
Description copied from interface:HasCastingReturns the list of cast sinks (Cast devices) available to the Chrome media router.- Specified by:
getCastSinksin interfaceHasCasting- Overrides:
getCastSinksin classChromiumDriver- Returns:
- list of ID / Name pairs of available cast sink targets
-
getCastIssueMessage
- Specified by:
getCastIssueMessagein interfaceHasCasting- Overrides:
getCastIssueMessagein classChromiumDriver- Returns:
- an error message if there is any issue in a Cast session.
-
selectCastSink
Description copied from interface:HasCastingSelects a cast sink (Cast device) as the recipient of media router intents (connect or play).- Specified by:
selectCastSinkin interfaceHasCasting- Overrides:
selectCastSinkin classChromiumDriver- Parameters:
deviceName- name of the target device.
-
startDesktopMirroring
Description copied from interface:HasCastingInitiates desktop mirroring for the current browser tab on the specified device.- Specified by:
startDesktopMirroringin interfaceHasCasting- Overrides:
startDesktopMirroringin classChromiumDriver- Parameters:
deviceName- name of the target device.
-
startTabMirroring
Description copied from interface:HasCastingInitiates tab mirroring for the current browser tab on the specified device.- Specified by:
startTabMirroringin interfaceHasCasting- Overrides:
startTabMirroringin classChromiumDriver- Parameters:
deviceName- name of the target device.
-
stopCasting
Description copied from interface:HasCastingStops casting from media router to the specified device, if connected.- Specified by:
stopCastingin interfaceHasCasting- Overrides:
stopCastingin classChromiumDriver- Parameters:
deviceName- name of the target device.
-
executeCdpCommand
Description copied from interface:HasCdpExecute a Chrome DevTools Protocol command and get returned result. The command and command args should follow chrome devtools protocol domains/commands.It is strongly encouraged to use
DevToolsAPI instead of this- Specified by:
executeCdpCommandin interfaceHasCdp- Overrides:
executeCdpCommandin classChromiumDriver- Parameters:
commandName- the command to execute with Chrome Dev Tools.parameters- any information needed to execute the Dev Tools command.- Returns:
- the name and value of the response.
-