use of io.appium.java_client.android.Activity in project java-client by appium.
the class AndroidTest method replaceValueTest.
@Test
public void replaceValueTest() {
String originalValue = "original value";
Activity activity = new Activity("io.appium.android.apis", ".view.Controls1");
startsActivity.startActivity(activity);
AndroidElement editElement = driver.findElement(MobileBy.AndroidUIAutomator("resourceId(\"io.appium.android.apis:id/edit\")"));
editElement.sendKeys(originalValue);
assertEquals(originalValue, editElement.getText());
String replacedValue = "replaced value";
editElement.replaceValue(replacedValue);
assertEquals(replacedValue, editElement.getText());
}
use of io.appium.java_client.android.Activity in project java-client by appium.
the class AndroidTest method setUp.
@Before
public void setUp() {
startsActivity = new StartsActivity() {
@Override
public Response execute(String driverCommand, Map<String, ?> parameters) {
return driver.execute(driverCommand, parameters);
}
@Override
public Response execute(String driverCommand) {
return driver.execute(driverCommand);
}
};
Activity activity = new Activity("io.appium.android.apis", ".ApiDemos");
startsActivity.startActivity(activity);
}
Aggregations