public class SelendroidCapabilities
extends org.openqa.selenium.remote.DesiredCapabilities
| Modifier and Type | Field and Description |
|---|---|
static String |
API_TARGET_TYPE |
static String |
AUT |
static String |
AUTOMATION_NAME |
static String |
BOOTSTRAP_CLASS_NAMES |
static String |
DISPLAY |
static String |
EMULATOR |
static String |
LAUNCH_ACTIVITY |
static String |
LOCALE |
static String |
MODEL |
static String |
PLATFORM_NAME |
static String |
PLATFORM_VERSION |
static String |
PRE_SESSION_ADB_COMMANDS |
static String |
SCREEN_SIZE |
static String |
SELENDROID_EXTENSIONS |
static String |
SERIAL |
| Constructor and Description |
|---|
SelendroidCapabilities() |
SelendroidCapabilities(org.json.JSONObject source) |
SelendroidCapabilities(Map<String,?> from) |
SelendroidCapabilities(String aut) |
SelendroidCapabilities(String serial,
String aut) |
| Modifier and Type | Method and Description |
|---|---|
SelendroidCapabilities |
addBootstrapClass(String className)
Adds a class to run on app startup.
|
static org.openqa.selenium.remote.DesiredCapabilities |
android(DeviceTargetPlatform platform) |
static SelendroidCapabilities |
copyOf(SelendroidCapabilities caps) |
static SelendroidCapabilities |
device(DeviceTargetPlatform platform,
String aut) |
static SelendroidCapabilities |
device(String aut) |
static SelendroidCapabilities |
empty() |
static SelendroidCapabilities |
emulator(DeviceTargetPlatform platform,
String aut) |
static SelendroidCapabilities |
emulator(String aut) |
String |
getAPITargetType()
Gets the API target type.
|
String |
getAut() |
String |
getAutomationName() |
String |
getBootstrapClassNames()
Full name of class to run on the device before starting the app under test.
|
String |
getDefaultApp(Set<String> supportedApps)
Returns the application under test in the format of "appName:appVersion", or "appName" if the supported application
does not have any version associated with it, or returns null if the requested app is not in the apps store.
|
Boolean |
getEmulator() |
String |
getLaunchActivity() |
String |
getLocale() |
String |
getModel() |
String |
getPlatformName() |
String |
getPlatformVersion() |
List<String> |
getPreSessionAdbCommands() |
Map<String,Object> |
getRawCapabilities() |
String |
getScreenSize() |
String |
getSelendroidExtensions()
Full path of the dex file (on the host machine) containing Selendroid extensions to be loaded at run time
Example: /home/user/extension.dex
|
String |
getSerial() |
void |
setAPITargetType(String apiTargetType)
Sets the API target type.
|
void |
setAut(String aut) |
void |
setEmulator(Boolean emulator) |
void |
setLaunchActivity(String launchActivity) |
void |
setLocale(String locale) |
void |
setModel(String model) |
void |
setPlatformVersion(DeviceTargetPlatform androidTarget) |
void |
setPreSessionAdbCommands(List<String> commands)
Command like: "shell setprop name selendroid", please note that the adb command itself and the
serial will be added by selendroid automatically.
|
void |
setScreenSize(String screenSize) |
SelendroidCapabilities |
setSelendroidExtensions(String filePath) |
void |
setSerial(String serial) |
SelendroidCapabilities |
withMerged(SelendroidCapabilities caps)
Returns a copy of this instance with
caps merged, overwriting existing keys on
collision. |
android, asMap, chrome, edge, equals, firefox, getBrowserName, getCapability, getPlatform, getVersion, hashCode, htmlUnit, htmlUnitWithJs, internetExplorer, ipad, iphone, is, isJavascriptEnabled, merge, opera, operaBlink, phantomjs, safari, setBrowserName, setCapability, setCapability, setCapability, setCapability, setJavascriptEnabled, setPlatform, setVersion, toStringpublic static final String AUT
public static final String EMULATOR
public static final String DISPLAY
public static final String LOCALE
public static final String SCREEN_SIZE
public static final String PRE_SESSION_ADB_COMMANDS
public static final String SERIAL
public static final String MODEL
public static final String API_TARGET_TYPE
public static final String PLATFORM_VERSION
public static final String PLATFORM_NAME
public static final String AUTOMATION_NAME
public static final String LAUNCH_ACTIVITY
public static final String SELENDROID_EXTENSIONS
public static final String BOOTSTRAP_CLASS_NAMES
public SelendroidCapabilities(org.json.JSONObject source)
throws org.json.JSONException
org.json.JSONExceptionpublic SelendroidCapabilities()
public SelendroidCapabilities(String aut)
public static SelendroidCapabilities empty()
public static SelendroidCapabilities copyOf(SelendroidCapabilities caps)
public String getSerial()
public String getPlatformVersion()
public String getAut()
public String getModel()
public String getAPITargetType()
public String getLaunchActivity()
public Boolean getEmulator()
public String getPlatformName()
public String getAutomationName()
public String getLocale()
public String getScreenSize()
public String getSelendroidExtensions()
public String getBootstrapClassNames()
public void setSerial(String serial)
public void setModel(String model)
public void setAPITargetType(String apiTargetType)
apiTargetType - the new API target typepublic void setPlatformVersion(DeviceTargetPlatform androidTarget)
public void setAut(String aut)
public void setLaunchActivity(String launchActivity)
public void setEmulator(Boolean emulator)
public void setLocale(String locale)
public void setScreenSize(String screenSize)
public SelendroidCapabilities setSelendroidExtensions(String filePath)
public SelendroidCapabilities addBootstrapClass(String className)
public static SelendroidCapabilities emulator(String aut)
aut - The application under test. Expected format is basePackage:version. E.g.:
io.selendroid.testapp:0.4public static SelendroidCapabilities emulator(DeviceTargetPlatform platform, String aut)
platform - The Android target platform to use.aut - The application under test. Expected format is basePackage:version. E.g.:
io.selendroid.testapp:0.4public static org.openqa.selenium.remote.DesiredCapabilities android(DeviceTargetPlatform platform)
public List<String> getPreSessionAdbCommands()
public void setPreSessionAdbCommands(List<String> commands)
commands - The list of ADB commands that will be executed before the test session starts
on the device.public static SelendroidCapabilities device(DeviceTargetPlatform platform, String aut)
platform - The Android target platform to use.aut - The application under test. Expected format is basePackage:version. E.g.:
io.selendroid.testapp:0.4public static SelendroidCapabilities device(String aut)
aut - The application under test. Expected format is basePackage:version. E.g.:
io.selendroid.testapp:0.4public SelendroidCapabilities withMerged(SelendroidCapabilities caps)
caps merged, overwriting existing keys on
collision.public String getDefaultApp(Set<String> supportedApps)
supportedApps - The list of supported apps in the apps store.Copyright © 2015. All rights reserved.