public class AppiumDriver extends org.openqa.selenium.remote.RemoteWebDriver implements ExecutesMethod, ComparesImages, ExecutesDriverScript, LogsEvents, HasBrowserCheck, HasSettings
| Modifier and Type | Field and Description |
|---|---|
protected org.openqa.selenium.remote.html5.RemoteLocationContext |
locationContext |
| Constructor and Description |
|---|
AppiumDriver(AppiumClientConfig clientConfig,
org.openqa.selenium.Capabilities capabilities) |
AppiumDriver(AppiumDriverLocalService service,
org.openqa.selenium.Capabilities capabilities) |
AppiumDriver(AppiumDriverLocalService service,
org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory,
org.openqa.selenium.Capabilities capabilities) |
AppiumDriver(AppiumServiceBuilder builder,
org.openqa.selenium.Capabilities capabilities) |
AppiumDriver(AppiumServiceBuilder builder,
org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory,
org.openqa.selenium.Capabilities capabilities) |
AppiumDriver(org.openqa.selenium.Capabilities capabilities) |
AppiumDriver(org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory,
org.openqa.selenium.Capabilities capabilities) |
AppiumDriver(org.openqa.selenium.remote.HttpCommandExecutor executor,
org.openqa.selenium.Capabilities capabilities)
Creates a new instance based on command
executor and capabilities. |
AppiumDriver(java.net.URL remoteAddress,
org.openqa.selenium.Capabilities capabilities) |
AppiumDriver(java.net.URL remoteAddress,
org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory,
org.openqa.selenium.Capabilities capabilities) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCommand(org.openqa.selenium.remote.http.HttpMethod httpMethod,
java.lang.String url,
java.lang.String methodName)
This method is used to add custom appium commands in Appium 2.0.
|
protected static org.openqa.selenium.Capabilities |
ensureAutomationName(org.openqa.selenium.Capabilities originalCapabilities,
java.lang.String defaultName)
Changes automation name if it is not set and returns merged capabilities.
|
protected static org.openqa.selenium.Capabilities |
ensurePlatformAndAutomationNames(org.openqa.selenium.Capabilities originalCapabilities,
java.lang.String defaultPlatformName,
java.lang.String defaultAutomationName)
Changes platform and automation names if they are not set
and returns merged capabilities.
|
protected static org.openqa.selenium.Capabilities |
ensurePlatformName(org.openqa.selenium.Capabilities originalCapabilities,
java.lang.String defaultName)
Changes platform name if it is not set and returns merged capabilities.
|
org.openqa.selenium.remote.Response |
execute(java.lang.String command)
Executes the given command and returns a response.
|
org.openqa.selenium.remote.Response |
execute(java.lang.String driverCommand,
java.util.Map<java.lang.String,?> parameters)
Executes the given command and returns a response.
|
org.openqa.selenium.remote.ExecuteMethod |
getExecuteMethod() |
java.net.URL |
getRemoteAddress() |
<X> X |
getScreenshotAs(org.openqa.selenium.OutputType<X> outputType) |
java.util.Map<java.lang.String,java.lang.Object> |
getStatus()
This method is used to get build version status of running Appium server.
|
protected void |
startSession(org.openqa.selenium.Capabilities capabilities) |
addVirtualAuthenticator, builder, close, execute, executeAsyncScript, executeScript, findElement, findElement, findElements, findElements, findElements, get, getCapabilities, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getFileDetector, getPageSource, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, perform, print, quit, removeVirtualAuthenticator, resetInputState, setCommandExecutor, setElementConverter, setErrorHandler, setFileDetector, setFoundBy, setLogLevel, setSessionId, switchTo, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindImageOccurrence, findImageOccurrence, findImageOccurrence, findImageOccurrence, getImagesSimilarity, getImagesSimilarity, getImagesSimilarity, getImagesSimilarity, matchImagesFeatures, matchImagesFeatures, matchImagesFeatures, matchImagesFeaturesexecuteDriverScript, executeDriverScriptgetEvents, logEventisBrowsergetSettings, setSetting, setSetting, setSettings, setSettingsprotected final org.openqa.selenium.remote.html5.RemoteLocationContext locationContext
public AppiumDriver(org.openqa.selenium.remote.HttpCommandExecutor executor,
org.openqa.selenium.Capabilities capabilities)
executor and capabilities.executor - is an instance of HttpCommandExecutor
or class that extends it. Default commands or another vendor-specific
commands may be specified there.capabilities - take a look at Capabilitiespublic AppiumDriver(AppiumClientConfig clientConfig, org.openqa.selenium.Capabilities capabilities)
public AppiumDriver(java.net.URL remoteAddress,
org.openqa.selenium.Capabilities capabilities)
public AppiumDriver(java.net.URL remoteAddress,
org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory,
org.openqa.selenium.Capabilities capabilities)
public AppiumDriver(AppiumDriverLocalService service, org.openqa.selenium.Capabilities capabilities)
public AppiumDriver(AppiumDriverLocalService service, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities capabilities)
public AppiumDriver(AppiumServiceBuilder builder, org.openqa.selenium.Capabilities capabilities)
public AppiumDriver(AppiumServiceBuilder builder, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities capabilities)
public AppiumDriver(org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory,
org.openqa.selenium.Capabilities capabilities)
public AppiumDriver(org.openqa.selenium.Capabilities capabilities)
protected static org.openqa.selenium.Capabilities ensurePlatformName(org.openqa.selenium.Capabilities originalCapabilities,
java.lang.String defaultName)
originalCapabilities - the given Capabilities.defaultName - a CapabilityType.PLATFORM_NAME value which has
to be set upCapabilities with changed platform name value or the original capabilitiesprotected static org.openqa.selenium.Capabilities ensureAutomationName(org.openqa.selenium.Capabilities originalCapabilities,
java.lang.String defaultName)
originalCapabilities - the given Capabilities.defaultName - a MobileCapabilityType.AUTOMATION_NAME value which has
to be set upCapabilities with changed mobile automation name value or the original capabilitiesprotected static org.openqa.selenium.Capabilities ensurePlatformAndAutomationNames(org.openqa.selenium.Capabilities originalCapabilities,
java.lang.String defaultPlatformName,
java.lang.String defaultAutomationName)
originalCapabilities - the given Capabilities.defaultPlatformName - a CapabilityType.PLATFORM_NAME value which has
to be set updefaultAutomationName - The default automation name to set up for this classCapabilities with changed platform/automation name value or the original capabilitiespublic org.openqa.selenium.remote.ExecuteMethod getExecuteMethod()
getExecuteMethod in class org.openqa.selenium.remote.RemoteWebDriverpublic java.util.Map<java.lang.String,java.lang.Object> getStatus()
public void addCommand(org.openqa.selenium.remote.http.HttpMethod httpMethod,
java.lang.String url,
java.lang.String methodName)
httpMethod - the available HttpMethod.url - The url to URL template as https://www.w3.org/TR/webdriver/#endpoints.methodName - The name of custom appium command.public java.net.URL getRemoteAddress()
protected void startSession(org.openqa.selenium.Capabilities capabilities)
startSession in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.remote.Response execute(java.lang.String driverCommand,
java.util.Map<java.lang.String,?> parameters)
ExecutesMethodexecute in interface ExecutesMethodexecute in class org.openqa.selenium.remote.RemoteWebDriverdriverCommand - a command to executeparameters - map of command parameterspublic org.openqa.selenium.remote.Response execute(java.lang.String command)
ExecutesMethodexecute in interface ExecutesMethodexecute in class org.openqa.selenium.remote.RemoteWebDrivercommand - a command to executepublic <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> outputType)
getScreenshotAs in interface org.openqa.selenium.TakesScreenshotgetScreenshotAs in class org.openqa.selenium.remote.RemoteWebDriver