在您构建该视图时,您为按钮添加了一个选择侦听器,以便应用程序能够对按钮单击作出响应。
As you're building the view, you add a selection listener to the button so that your application can respond to button clicks.
请注意,测试自动化是通过直接调用按钮控件的相关方法模拟按钮单击的,而不是通过触发事件模拟。
Notice that the test automation simulates a button click by directly invoking the button control's associated method rather than by firing an event.
现在可以转到开发人员控制台以查看 TestActivity 日志以及按钮单击所引发的消息。
You can go to the developer's console now to look at the TestActivity log and see the message emitted by the button click.
应用推荐