Description
The problem
Briefly describe the issue you are experiencing (or the feature you want to see added to Appium). Tell us what you were trying to do and what happened instead. Remember, this is not a place to ask questions. For that, go to http://discuss.appium.io!
Environment
- Appium version:1.6.5
- java-client:5.0.0-BETA8
- mac os:10.12
- simulator:iphone6s 10.3
Details
iosTouchAction.press(startX,startY).waitAction(1000).moveTo(endX,endY).release().perform();
first time everything is ok,but the second time app is interrupted
Link to Appium logs
[HTTP] --> POST /wd/hub/session/df78aa2e-ae33-4a2f-9d24-82887a041b05/touch/perform {"actions":[{"action":"press","options":{"x":100,"y":600}},{"action":"wait","options":{"ms":1000}},{"action":"moveTo","options":{"x":0,"y":-500}},{"action":"release","options":{}}]}
[debug] [MJSONWP] Calling AppiumDriver.performTouch() with args: [[{"action":"press","options":{"x":100,"y":600}},{"action":"wait","options":{"ms":1000}},{"action":"moveTo","options":{"x":0,"y":-500}},{"action":"release","options":{}}],"df78aa2e-ae33-4a2f-9d24-82887a041b05"]
[debug] [XCUITest] Executing command 'performTouch'
[debug] [XCUITest] Received the following touch action: press(options={"x":100,"y":600})-wait(options={"ms":1000})-moveTo(options={"x":0,"y":-500})-release(options={})
[debug] [XCUITest] Found matching gesture: drag
[debug] [JSONWP Proxy] Proxying [POST /wda/dragfromtoforduration] to [POST http://localhost:8100/session/B4B41FBF-79FD-4343-AE46-17DFBE584DE3/wda/dragfromtoforduration] with body: {"fromX":100,"fromY":600,"toX":100,"toY":100,"duration":1}
[debug] [JSONWP Proxy] Got response with status 200: {"value":{},"sessionId":"B4B41FBF-79FD-4343-AE46-17DFBE584DE3","status":0}
[debug] [MJSONWP] Responding to client with driver.performTouch() result: null
[HTTP] <-- POST /wd/hub/session/df78aa2e-ae33-4a2f-9d24-82887a041b05/touch/perform 200 9448 ms - 76
[HTTP] --> POST /wd/hub/session/df78aa2e-ae33-4a2f-9d24-82887a041b05/touch/perform {"actions":[{"action":"press","options":{"x":100,"y":600}},{"action":"wait","options":{"ms":1000}},{"action":"moveTo","options":{"x":0,"y":-500}},{"action":"release","options":{}},{"action":"press","options":{"x":100,"y":600}},{"action":"wait","options":{"ms":1000}},{"action":"moveTo","options":{"x":0,"y":-500}},{"action":"release","options":{}}]}
[debug] [MJSONWP] Calling AppiumDriver.performTouch() with args: [[{"action":"press","options":{"x":100,"y":600}},{"action":"wait","options":{"ms":1000}},{"action":"moveTo","options":{"x":0,"y":-500}},{"action":"release","options":{}},{"action":"press","options":{"x":100,"y":600}},{"action":"wait","options":{"ms":1000}},{"action":"moveTo","options":{"x":0,"y":-500}},{"action":"release","options":{}}],"df78aa2e-ae33-4a2f-9d24-82887a041b05"]
[debug] [XCUITest] Executing command 'performTouch'
[debug] [XCUITest] Received the following touch action: press(options={"x":100,"y":600})-wait(options={"ms":1000})-moveTo(options={"x":0,"y":-500})-release(options={})-press(options={"x":100,"y":600})-wait(options={"ms":1000})-moveTo(options={"x":0,"y":-500})-release(options={})
[HTTP] <-- POST /wd/hub/session/df78aa2e-ae33-4a2f-9d24-82887a041b05/touch/perform 501 12 ms - 759
[HTTP] --> DELETE /wd/hub/session/df78aa2e-ae33-4a2f-9d24-82887a041b05 {}
[debug] [MJSONWP] Calling AppiumDriver.deleteSession() with args: ["df78aa2e-ae33-4a2f-9d24-82887a041b05"]
[debug] [BaseDriver] Event 'quitSessionRequested' logged at 1498469269578 (17:27:49 GMT+0800 (CST))
[debug] [JSONWP Proxy] Proxying [DELETE /session/df78aa2e-ae33-4a2f-9d24-82887a041b05] to [DELETE http://localhost:8100/session/B4B41FBF-79FD-4343-AE46-17DFBE584DE3] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\n "value" : {\n\n },\n "sessionId" : "CA09BB7D-A8AC-43C7-A215-BDFE83E81AEE",\n "status" : 0\n}"
[debug] [XCUITest] Found WDA derived data folder: '/Users/yefan/Library/Developer/Xcode/DerivedData/WebDriverAgent-gbqaphewpezlskbdiruxlskdukra'
[XCUITest] Setting '755' permissions to '/Users/yefan/Library/Developer/Xcode/DerivedData/WebDriverAgent-gbqaphewpezlskbdiruxlskdukra/Logs/Test/Attachments' folder
[debug] [XCUITest] Found WDA derived data folder: '/Users/yefan/Library/Developer/Xcode/DerivedData/WebDriverAgent-gjeeslpzryfzaigbwlfeozhffztb'
[XCUITest] Setting '755' permissions to '/Users/yefan/Library/Developer/Xcode/DerivedData/WebDriverAgent-gjeeslpzryfzaigbwlfeozhffztb/Logs/Test/Attachments' folder
[debug] [XCUITest] Not clearing log files. Use clearSystemFiles
capability to turn on.
[debug] [iOSLog] Stopping iOS log capture
[Appium] Removing session df78aa2e-ae33-4a2f-9d24-82887a041b05 from our master session list
[debug] [BaseDriver] Event 'quitSessionFinished' logged at 1498469270117 (17:27:50 GMT+0800 (CST))
[debug] [MJSONWP] Received response: null
[debug] [MJSONWP] But deleting session, so not returning
[debug] [MJSONWP] Responding to client with driver.deleteSession() result: null
Code To Reproduce Issue [ Good To Have ]
@Test
public void testBuyBuy() throws InterruptedException {
Thread.sleep(3000);
driver.findElementByName("买买买").click();
Thread.sleep(5000);
IOSTouchAction iosTouchAction = new IOSTouchAction(driver);
Thread.sleep(3000);
for(int i = 0; i < 10; i++){
int startX = 100;
int startY = 600;
int endX = 0;
int endY = -500;
iosTouchAction.press(startX,startY).waitAction(1000).moveTo(endX,endY).release().perform();
Thread.sleep(2000);
}
}