public class MobileDriverFactory
| Modifiers | Name | Description |
|---|---|---|
static String |
EXISTING_DRIVER_PROPERTY |
|
static String |
IS_REMOTE_WEB_DRIVER_URL_ENCRYPTED |
|
static String |
MOBILE_DRIVER_PROPERTY |
|
static String |
REMOTE_DRIVER_PROPERTY |
|
static String |
REMOTE_WEB_DRIVER_URL |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static void |
cleanup()Clean up all running drivers and processes |
|
public static void |
clearExistingDriverProperty() |
|
public static void |
closeDriver()Close the current active mobile driver |
|
public static String |
getDeviceId()Get the id of the current mobile device |
|
public static String |
getDeviceManufacturer()Get the manufacturer of the current mobile device |
|
public static String |
getDeviceModel()Get the model of the current mobile device |
|
public static String |
getDeviceName()Get the name of the current mobile device |
|
public static String |
getDeviceOS()Get the os of the current mobile device |
|
public static String |
getDeviceOSVersion()Get the os version of the current mobile device |
|
public static String |
getDevicePlatform()Get the platform of the current active driver |
|
public static AppiumDriver |
getDriver()Get the current active native app mobile driver |
|
public static IDriverType |
getExecutedDriver()Get the native app mobile driver type of the current active driver |
|
public static MobileDriverType |
getMobileDriverType()Get the native app mobile driver type of the current active driver |
|
public static String |
getRemoteDeviceId()Get the id of the remote mobile device |
|
public static String |
getRemoteDeviceManufacturer()Get the manufacturer of the remote mobile device |
|
public static String |
getRemoteDeviceModel()Get the model of the remote mobile device |
|
public static String |
getRemoteDeviceName()Get the name of the remote mobile device |
|
public static String |
getRemoteDeviceOS()Get the os of the remote mobile device |
|
public static String |
getRemoteDeviceOSVersion()Get the os version of the remote mobile device |
|
public static MobileDriverType |
getRemoteMobileDriver() |
|
public static Map<String, Object> |
getRemoteWebDriverPreferences()
|
|
public static String |
getRemoteWebDriverServerUrl()
|
|
public static String |
getRemoteWebDriverType()
|
|
public static boolean |
isRemoteWebDriver()
|
|
public static boolean |
isUsingAndroid7OrBigger() |
|
public static void |
setDriver(AppiumDriver driver)Sets the current active mobile driver. |
|
protected static AppiumDriver |
startExistingBrowser() |
|
protected static AppiumDriver |
startExistingDriver() |
|
public static AppiumDriver |
startLocalMobileDriver(MobileDriverType osType, String deviceId, String deviceName, String platformVersion, String appFile, boolean uninstallAfterCloseApp)Start a new native app mobile driver |
|
public static AppiumDriver |
startMobileDriver(String appId) |
|
public static AppiumDriver |
startMobileDriver(String appFile, boolean uninstallAfterCloseApp)Start a new native app mobile driver |
|
public static AppiumDriver |
startRemoteMobileDriver(String remoteWebUrl, DesiredCapabilities desiredCapabilities, MobileDriverType driverType, String appFile) |
Clean up all running drivers and processes
Close the current active mobile driver
Get the id of the current mobile device
Get the manufacturer of the current mobile device
Get the model of the current mobile device
Get the name of the current mobile device
Get the os of the current mobile device
Get the os version of the current mobile device
Get the platform of the current active driver
Possible values: iOS, Android
Get the current active native app mobile driver
Get the native app mobile driver type of the current active driver
Get the native app mobile driver type of the current active driver
Get the id of the remote mobile device
Get the manufacturer of the remote mobile device
Get the model of the remote mobile device
Get the name of the remote mobile device
Get the os of the remote mobile device
Get the os version of the remote mobile device
true when this run targets a remote Appium/RemoteWebDriver server,
false for a LOCAL Appium driver. Backed by the
RunConfiguration#REMOTE_DRIVER_PROPERTY#REMOTE_DRIVER_PROPERTY ("Remote") property — there is no
separate enabled/disabled flag stored alongside it, only the server URL (and its
encryption flag), so a configured, non-blank getRemoteWebDriverServerUrl()
is itself the authoritative LOCAL-vs-REMOTE signal. This is the same condition
startMobileDriver itself branches on to pick startRemoteMobileDriver
vs. startLocalMobileDriver — exposed here so other callers don't have to
re-derive it from the raw URL string.Sets the current active mobile driver.
driver - the mobile driver to setStart a new native app mobile driver
osType - the os type for the new mobile driver with type MobileDriverTypedeviceId - id of the devicedeviceName - name of the deviceplatformVersion - platform version of the deviceappFile - absolute path of the application fileuninstallAfterCloseApp - true to un-install the app after executionStart a new native app mobile driver
appFile - the absolute path of the application fileuninstallAfterCloseApp - true to un-install the app after execution