我正在尝试自动化移动应用程序的测试。我被困在应用程序重定向到设置的位置,你必须为键盘启用“完全访问”。我能够使用“TouchActions”成功导航,但是一旦弹出系统警报就会出现问题。该命令永远不会停止执行。
我尝试过使用AutoAcceptAlert,添加等待脚本等待警报加载,但它只接受应用程序支持警报而不接受系统警报。
appium检查员无法检测到警报,也无法使用屏幕上的坐标执行TouchAction。 (我知道这个命令永远不会停止执行,如eclipse中的调试模式所示)。
命令告诉我们启用完全访问权限,但后面的任何“DRIVER”命令都不会停止执行。即使我使用不正确的分接坐标,命令也应该至少执行并转移到下一行。
示例:命令System.out.println("message")
成功将消息记录到控制台,但driver.tap
命令不会停止执行。
有没有办法在真实设备上接受系统警报?
是否发生这种情况是因为更改应用程序的设置会在后台刷新应用程序导致驱动程序暂停/崩溃?但接受系统警报后不应该发生这种情况吗?
或者,如果有一种方法可以在模拟器中安装消息,那么这也将为我面临的问题提供一种解决方法。
这是
之后的appium日志action.tap(x, y).perform();
Appium -
info: --> POST /wd/hub/session/56d883be-f0b2-4a9a-8818-6744f5d2d199/touch/perform {"actions":[{"action":"tap","options":{"x":192,"y":473}}]}
info: [debug] Pushing command to appium work queue: "UIATarget.localTarget().frontMostApp().rect()"
info: [debug] Sending command to instruments: UIATarget.localTarget().frontMostApp().rect()
info: [debug] [INST] 2016-01-07 03:59:05 +0000 Debug: evaluation finished
info: [debug] [INST] 2016-01-07 03:59:05 +0000 Debug: responding with:
info: [debug] [INST] 2016-01-07 03:59:05 +0000 Debug: Running system command #53: /Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{"status":0,"value":""}...
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.795 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.729 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.646 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.636 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.745 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.947 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.632 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 1.024 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.546 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 1.075 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.629 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 1.528 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: [IOS_SYSLOG_ROW ] Jan 7 09:29:57 Apps-iPhone Test App[2010] <Warning>: Device is connected to the internet
info: [IOS_SYSLOG_ROW ] Jan 7 09:29:58 Apps-iPhone syncdefaultsd[2013] <Notice>: (Note ) SYDAlwaysOnAccount: no account (null)
info: [IOS_SYSLOG_ROW ] Jan 7 09:29:58 Apps-iPhone syncdefaultsd[2013] <Notice>: (Note ) SYDAccount: no account
info: [IOS_SYSLOG_ROW ] Jan 7 09:29:58 Apps-iPhone syncdefaultsd[2013] <Notice>: (Note ) SYDPIMAccount: no account (null)
info: [IOS_SYSLOG_ROW ] Jan 7 09:29:59 Apps-iPhone Test App[2010] <Warning>: Success Response: success
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.827 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.627 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.614 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.765 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.859 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.917 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.538 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.545 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.531 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.645 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 0.745 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: <-- GET /wd/hub/status 200 1.080 ms - 179 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"},"isShuttingDown":false},"sessionId":"56d883be-f0b2-4a9a-8818-6744f5d2d199"}
info: [IOS_SYSLOG_ROW ] Jan 7 09:30:57 Apps-iPhone Test App[2010] <Warning>: Device is connected to the internet
info: [IOS_SYSLOG_ROW ] Jan 7 09:30:58 Apps-iPhone Test App[2010] <Warning>: Success Response: success