-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to perform many times press and maveTo on IOS Native application using XCUITest (Appium) #8734
Comments
I assume this code is not exactly doing what it is supposed to do, but try to move IOSTouchAction instance creation into the loop. |
i would do it like this:
|
@vjmaiky this code might be less ineffective from performance point of view in comparison to a native call. There is mobile: scroll endpoint with name/predicate/toVisible arguments, which does the same task natively. BTW, I would not ever recommend catching Throwable explicitly. |
it can be use NosuchelementException with getting text and compare with desired catch expression, etc. Regarding mobile:scroll i will give it a try even if i like more touch actions. |
Catch WebDriverException and you'll never miss anything ;) |
@mykola-mokhnach I do it what you said,create IOSTouchAction instance into loop,everything looks all right |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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
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 ]
iosTouchAction.press(startX,startY).waitAction(1000).moveTo(endX,endY).release().perform();
Thread.sleep(2000);
}
}
The text was updated successfully, but these errors were encountered: