Appium??????????EditText
???????????? ???????[ 2015/6/30 15:34:04 ] ??????????????????
????adb???????????Android Debug Bridge??
????adb ??PC???豸??????????????????adb??devices??????????
????adb devices ?г????devices
????adb kill-server ???adb????????豸???????????????
????adb start-server ????adb????
????adb shell ???????device??Linux shell????????????Linux????
????adb shell screenrecord /sdcard/runCase.mp4 ?????????棬???3min????????--time-limit 60???????
????adb install jd.apk ???豸???app
????adb pull /sdcard/runCase.mp4 c:// ??????????copy??????
????adb push C://runCase.mp4 /sdcard/ ????????????????
???????????Щ??????adb ????
????appium?????
????????????webdriver ?????????????????easy??appium??????????webdriver??
????selenium ????????TakesScreenShot???getScreenShotAs?????????????????
1 /**
2 * This Method create for take screenshot
3 *
4 * @author Young
5 * @param drivername
6 * @param filename
7 */
8 public static void snapshot(TakesScreenshot drivername?? String filename) {
9 // this method will take screen shot ??require two parameters ??one is
10 // driver name?? another is file name
11
12 String currentPath = System.getProperty("user.dir"); // get current work
13 // folder
14 File scrFile = drivername.getScreenshotAs(OutputType.FILE);
15 // Now you can do whatever you need to do with it?? for example copy
16 // somewhere
17 try {
18 System.out.println("save snapshot path is:" + currentPath + "/"
19 + filename);
20 FileUtils
21 .copyFile(scrFile?? new File(currentPath + "\" + filename));
22 } catch (IOException e) {
23 System.out.println("Can't save screenshot");
24 e.printStackTrace();
25 } finally {
26 System.out.println("screen shot finished?? it's in " + currentPath
27 + " folder");
28 }
29 }
????????? snapshot((TakesScreenshot) driver?? "zhihu_showClose.png");
???????????????????????????????????????????????????????Ч
????appium???EditText????????
?????????appium?????У?????sendkeys??clear??????????????????????????????????????
???????????keyEvent????????????ο?api http://appium.github.io/java-client/
?????????????????????????
????1. ??????????
????2. ??????????
????3. ???????????????????????????
?????????????? 123???67
????public static final intBACKSPACE67
????public static final intDEL67
????public static final intKEYCODE_MOVE_END123
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11