public class MobileBaseState extends Object implements IBaseState
MobileBaseState mobileBaseState = new MobileBaseState();
mobileBaseState.setConnectionString("platformName=Android;deviceName=MotoG3;app=C:/myApp.apk");
MobileDevice mobileDevice = baseState.execute(desktop);
Constructor and Description |
---|
MobileBaseState()
Creates a mobile base state with the information from the default settings file "silk4j.settings".
|
MobileBaseState(File silk4jSettingsFile)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
<T extends TestObject> |
execute(Desktop desktop)
Executes the base state on the machine as specified by the desktop.
|
String |
getConnectionString()
Gets the connection string that specifies the mobile device and the app to test.
|
void |
setConnectionString(String connectionString)
Sets the connection string that specifies the mobile device and the app to test.
|
void |
setOption(String optionName,
Object optionValue)
Sets an Agent option.
|
public MobileBaseState()
public MobileBaseState(File silk4jSettingsFile)
silk4jSettingsFile
- public <T extends TestObject> T execute(Desktop desktop)
IBaseState
execute
in interface IBaseState
desktop
- The desktoppublic String getConnectionString()
public void setConnectionString(String connectionString)
connectionString
- the connection string that specifies the mobile device and the app to test. Examples: platformName=Android;deviceName=MotoG3;app=C:/myApp.apk
platformName=iOS;deviceName=myiPhone6;app=C:/myApp.ipa;host=10.0.0.1
public void setOption(String optionName, Object optionValue)
baseState.setOption(CommonOptions.OPT_WAIT_RESOLVE_OBJDEF, true)
optionName
- The name of the option. For a list of available options see CommonOptions
.optionValue
- The value of the option.
Copyright 2009-2012 Micro Focus. All Rights Reserved.