Robotium&安培;系统对话框 [英] Robotium & system dialogs

查看:127
本文介绍了Robotium&安培;系统对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试配对的蓝牙设备,将出现PIN系统确认对话框。有按钮取消和OK。但我不能按他们与Robotium。我怎样才能在Robotium Android操作系统对话框工作?
谢谢你。

When I try to pair with Bluetooth device, system confirmation dialog with PIN appears. There are buttons "Cancel" and "OK". But I can't click them with Robotium. How can I work with Android OS dialogs in Robotium? Thanks.

推荐答案

这对我的作品:

solo.clickOnView(solo.getView(android.R.id.button1)); 

其中,积极按钮android.R.id.button1,否定按钮android.R.id.button2和中性的android.R.id.button3。

where the 'Positive' button is android.R.id.button1, the 'Negative' button is android.R.id.button2 and 'Neutral' is android.R.id.button3.

这篇关于Robotium&安培;系统对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆