|
@@ -30,7 +30,7 @@ public class AppiumUtil {
|
|
|
public static final String APP_SWIPE_TYPE_LEFT = "left";
|
|
|
public static final String APP_SWIPE_TYPE_RIGHT = "right";
|
|
|
|
|
|
- public void swipeToUp(AndroidDriver driver) {
|
|
|
+ private void swipeToUp(AndroidDriver driver) {
|
|
|
int width = driver.manage().window().getSize().width;
|
|
|
int height = driver.manage().window().getSize().height;
|
|
|
TouchAction action1 = new TouchAction(driver).press(PointOption.point(width / 2, height * 3 / 4)).waitAction(WaitOptions.waitOptions(duration))
|
|
@@ -38,7 +38,7 @@ public class AppiumUtil {
|
|
|
action1.perform();
|
|
|
}
|
|
|
|
|
|
- public void swipeToDown(AndroidDriver driver) {
|
|
|
+ private void swipeToDown(AndroidDriver driver) {
|
|
|
int width = driver.manage().window().getSize().width;
|
|
|
int height = driver.manage().window().getSize().height;
|
|
|
TouchAction action2 = new TouchAction(driver).press(PointOption.point(width / 2, height / 4)).waitAction(WaitOptions.waitOptions(duration))
|
|
@@ -46,7 +46,7 @@ public class AppiumUtil {
|
|
|
action2.perform();
|
|
|
}
|
|
|
|
|
|
- public void swipeToLeft(AndroidDriver driver) {
|
|
|
+ private void swipeToLeft(AndroidDriver driver) {
|
|
|
int width = driver.manage().window().getSize().width;
|
|
|
int height = driver.manage().window().getSize().height;
|
|
|
TouchAction action3 = new TouchAction(driver).press(PointOption.point(width * 3 / 4, height / 2)).waitAction(WaitOptions.waitOptions(duration))
|
|
@@ -54,7 +54,7 @@ public class AppiumUtil {
|
|
|
action3.perform();
|
|
|
}
|
|
|
|
|
|
- public void tapPoint(AndroidDriver driver, Integer x, Integer y) {
|
|
|
+ private void tapPoint(AndroidDriver driver, Integer x, Integer y) {
|
|
|
TouchAction action = new TouchAction(driver).tap(PointOption.point(x, y)).release();
|
|
|
action.perform();
|
|
|
}
|
|
@@ -232,11 +232,8 @@ public class AppiumUtil {
|
|
|
nextView.click();
|
|
|
}
|
|
|
break;
|
|
|
- //TODO ---- 重置密码
|
|
|
case "com.yxcorp.login.userlogin.RetrievePasswordActivity":
|
|
|
-
|
|
|
break;
|
|
|
- //TODO
|
|
|
case "com.yxcorp.login.userlogin.ResetSelectedAccountPasswordActivity":
|
|
|
WebElement confirmBtn = getElementByType(androidDriver, FIND_ELEMENT_TYPE_ID, "com.smile.gifmaker:id/confirm_btn");
|
|
|
WebElement loginPsdEt = getElementByType(androidDriver, FIND_ELEMENT_TYPE_ID, "com.smile.gifmaker:id/login_psd_et");
|
|
@@ -725,8 +722,7 @@ public class AppiumUtil {
|
|
|
}
|
|
|
tapPoint(androidDriver, x, y);
|
|
|
} else if ("send".equals(clickType)) {
|
|
|
- String text = taskItem.getTextEqualKey();
|
|
|
- element.sendKeys(text);
|
|
|
+ element.sendKeys(taskItem.getTextEqualKey());
|
|
|
} else if ("text".equals(clickType)) {
|
|
|
getText = element.getText();
|
|
|
}
|