@Telmo_Cardoso that didn’t work, the screen didn’t scroll up.
public void swipeUpElement(AppiumDriver driver, MobileElement element, int duration){
int topY = element.getLocation().getY();
int bottomY = topY + element.getSize().getHeight();
int centerX = element.getLocation().getX() + (element.getSize().getWidth()/2);
driver.swipe(centerX, bottomY, centerX, topY, duration);
}
MobileElement element = (MobileElement) driver.findElement(By.xpath("//*[@name=‘anonymous_shop_btn’]"));
swipeUpElement(driver, element, 2000);
Please find the appium stack trace
info: [debug] [INST] 2014-12-23 17:26:15 +0000 Debug: Got new command 20 from instruments: au.dragApp(187,530,187,495,2)
info: [debug] [INST] 2014-12-23 17:26:15 +0000 Debug: evaluating au.dragApp(187,530,187,495,2)
info: [debug] [INST] 2014-12-23 17:26:15 +0000 Debug: target.dragFromToForDuration({x:“187”, y:“530”}, {x:“187”, y:“495”}, “2”)
info: [debug] Socket data received (25 bytes)
info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {“status”:0,“value”:""}
info: [debug] [INST] 2014-12-23 17:26:17 +0000 Debug: evaluation finished
info: [debug] [INST] 2014-12-23 17:26:17 +0000 Debug: responding with:
info: [debug] [INST] 2014-12-23 17:26:17 +0000 Debug: Running system command #21: /Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:""}…
info: [debug] Responding to client with success: {“status”:0,“value”:"",“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: <-- POST /wd/hub/session/7fce5bc9-92f9-474d-a370-c063cd34c7c3/touch/perform 200 4192.604 ms - 74 {“status”:0,“value”:"",“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: [IOS_SYSLOG_ROW ] Dec 23 22:56:28 — last message repeated 1 time —
info: [IOS_SYSLOG_ROW ] Dec 23 22:56:28 Sais-MacBook-Air-2 com.apple.CoreSimulator.SimDevice.41B6881E-2278-4F26-BBE9-B782876D9462.launchd_sim[48233] (com.apple.imfoundation.IMRemoteURLConnectionAgent): The _DirtyJetsamMemoryLimit key is not available on this platform.
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: <-- GET /wd/hub/status 200 0.661 ms - 178 {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: <-- GET /wd/hub/status 200 0.552 ms - 178 {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: <-- GET /wd/hub/status 200 0.605 ms - 178 {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: <-- GET /wd/hub/status 200 0.531 ms - 178 {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: <-- GET /wd/hub/status 200 0.646 ms - 178 {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: <-- GET /wd/hub/status 200 0.681 ms - 178 {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: <-- GET /wd/hub/status 200 0.449 ms - 178 {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: <-- GET /wd/hub/status 200 0.542 ms - 178 {“status”:0,“value”:{“build”:{“version”:“1.3.3”,“revision”:“34e21b01b87d4e3959e1c97c0a8d0b1a610bdc78”},“isShuttingDown”:false},“sessionId”:“7fce5bc9-92f9-474d-a370-c063cd34c7c3”}
info: [IOS_SYSLOG_ROW ] Dec 23 22:56:58 — last message repeated 1 time —
info: [IOS_SYSLOG_ROW ] Dec 23 22:56:58 Sais-MacBook-Air-2 com.apple.CoreSimulator.SimDevice.41B6881E-2278-4F26-BBE9-B782876D9462.launchd_sim[48233] (com.apple.imfoundation.IMRemoteURLConnectionAgent): The _DirtyJetsamMemoryLimit key is not available on this platform.
info: --> DELETE /wd/hub/session/7fce5bc9-92f9-474d-a370-c063cd34c7c3 {}
info: Shutting down appium session
info: [debug] Stopping ios
info: [debug] Destroying instruments client socket.
info: [debug] Closing socket server.
info: [debug] Instruments socket server was closed
info: [debug] Sending sigterm to instruments
info: [debug] [INST] 2014-12-23 17:26:59 +0000 Stopped: Script was stopped by the user
info: [IOS_SYSLOG_ROW ] Dec 23 22:56:59 Sais-MacBook-Air-2.local SpringBoard[48244]: Unable to get short BSD proc info for 48274: No such process
info: [IOS_SYSLOG_ROW ] Dec 23 22:56:59 Sais-MacBook-Air-2 com.apple.CoreSimulator.SimDevice.41B6881E-2278-4F26-BBE9-B782876D9462.launchd_sim[48233] (UIKitApplication:com.tesco.grocery[0x750f][48274]): Service exited due to signal: Killed: 9
info: [IOS_SYSLOG_ROW ] Dec 23 22:56:59 Sais-MacBook-Air-2.local SpringBoard[48244]: Application ‘UIKitApplication:com.tesco.grocery[0x750f]’ exited abnormally via signal.
info: [IOS_SYSLOG_ROW ] Dec 23 22:56:59 Sais-MacBook-Air-2 assertiond[48248]: assertion failed: 14B25 12A365: assertiond + 11619 [03CE1BE5-ACCB-3989-A453-41D167A25E66]: 0x1
info: [IOS_SYSLOG_ROW ] Dec 23 22:56:59 Sais-MacBook-Air-2.local assertiond[48248]: notify_suspend_pid() failed with error 7
info: [IOS_SYSLOG_ROW ] Dec 23 22:56:59 Sais-MacBook-Air-2 assertiond[48248]: assertion failed: 14B25 12A365: assertiond + 11619 [03CE1BE5-ACCB-3989-A453-41D167A25E66]: 0x1
info: [debug] [INST] Instruments Trace Complete (Duration : 105.777145s; Output : /tmp/appium-instruments/instrumentscli0.trace)
info: [debug] [INSTSERVER] Instruments exited with code 0
info: [debug] Cleaning up after instruments exit
info: [debug] Stopping iOS log capture
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator
info: [debug] Killing any other simulator daemons
info: [IOS_SYSLOG_ROW ] Dec 23 22:56:59 Sais-MacBook-Air-2.local DTMobileIS[48252]: Could not create service named com.apple.instruments.server.services.launchdaemon
info: [IOS_SYSLOG_ROW ] Dec 23 22:56:59 Sais-MacBook-Air-2.local DTMobileIS[48252]: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn