• ॴଐ: NTTιϑτΣΞגࣜձࣾ • ۀ༰: – ࣾAndroid™ؔ࿈ϓϩδΣΫτٕज़ࢧԉ – Androidؔ࿈ࣾݚमߨࢣ • ϓϥΠϕʔτ: – Androidͷࣗಈςετʹ͍ͭͯϒϩάॻ͍ͯ·͢ http://sumio.hatenablog.com/ ( ) Android is a trademark of Google Inc. 2
/* (લུ) */ getInteractionController() .longTapNoSync(rect.left + 20, rect.centerY()); // check if the edit menu is open UiObject selectAll = new UiObject(new UiSelector() .descriptionContains("Select all")); if (selectAll.waitForExists(50)) selectAll.click(); // wait for the selection SystemClock.sleep(250); // delete it getInteractionController().sendKey(KeyEvent.KEYCODE_DEL, 0); • UiObject.clearTextField()ͷ࣮(*)Λݩʹ࡞ͬͯΈΔ (*)https://android.googlesource.com/platform/frameworks/uiautomator/+/android-‐4.4.1_r1/src/com/android/ uiautomator/core/UiObject.javaΑΓҰ෦Ҿ༻
+ 20, rect.centerY()); // check if the edit menu is open UiObject selectAll = new UiObject(new UiSelector() .descriptionContains("Select all")); if (selectAll.waitForExists(50)) selectAll.click(); // wait for the selection SystemClock.sleep(250); // delete it getInteractionController().sendKey(KeyEvent.KEYCODE_DEL, 0); • getInteractionController()ར༻෦ ˠΞΫηεෆՄͳͷͰɺదͳpublicϝιουͰସ • "Select All"ͷݕࡧ݅ ˠ"ͯ͢બ"ʹมߋ UiObject.longClickTopLeft()Λ͏ UiDevice.pressDelete()Λ͏ "ͯ͢બ"ʹ͢Δ