Skip to content
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

AlertView 无效 #24

Closed
TediWang opened this issue Apr 7, 2016 · 6 comments
Closed

AlertView 无效 #24

TediWang opened this issue Apr 7, 2016 · 6 comments
Assignees

Comments

@TediWang
Copy link

TediWang commented Apr 7, 2016

IOS的AlertView弹出后,希望通过脚本去点击。
使用elementByXPath和Name都无法生效。

@ziczhu
Copy link
Member

ziczhu commented Apr 7, 2016

@TediWang iOS 下可以直接用 acceptAlert 或者 dismissAlert 来选择接受或者忽视 Alert,不用去查找元素,如果嫌麻烦,并且 Alert 不是功能性的(比如你是通过 Alert 来选择),可以在配置中就设置 autoAcceptAlerts: true。

@xudafeng xudafeng closed this as completed Apr 7, 2016
@ziczhu ziczhu reopened this Apr 7, 2016
@ziczhu
Copy link
Member

ziczhu commented Apr 7, 2016

@TediWang 如果设置了 autoAcceptAlerts 还是没有用,你可以把 macaca server 的日志发出来看一下,grep '/wd/hub/session/temp/accept_alert' xxx.txt -C10,xxx.txt 是日志文件。

@TediWang
Copy link
Author

TediWang commented Apr 7, 2016

@zenzhu : 日志如下
Proxy: /wd/hub/session/temp/accept_alert:POST to http://10.32.24.19:8100/session/BD46D161-F35A-45D0-A273-1F774A36D42D/accept_alert:POST with body: {}
Got response with status 200: {"value":"Unhandled endpoint: /session/BD46D161-F35A-45D0-A273-1F774A36D42D/accept_alert -- http://10.32.24.19:8100/ with parameters {\n wildcards = (\n "session/BD46D161-F35A-45D0-A...

@TediWang
Copy link
Author

TediWang commented Apr 7, 2016

大概的可能和连续2次弹窗有关:
如果连续2次弹窗,一个是定位授权,一个是通知授权。不管是手动调用还是自动aceept设置,都只能点掉一个,另一个点不掉。循环10次也是一样。

@ziczhu
Copy link
Member

ziczhu commented Apr 7, 2016

@TediWang
Copy link
Author

TediWang commented Apr 7, 2016

更新后已解决,赞!

@TediWang TediWang closed this as completed Apr 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants