robotium - 上点击操作栏选项卡 [英] robotium - clicking on action bar tabs

查看:295
本文介绍了robotium - 上点击操作栏选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我完成了移动的动作条(使用actionbarsherlock),和最后一件事就是把所有的robotium集成测试。点击操作栏行动项目似乎是解决了,但我不知道如何去点击操作栏的选项卡与Robotium。

I'm finishing up moving to the actionbar (using actionbarsherlock), and one of the last things is to convert all the robotium integration tests. Clicking on action bar action items seems to be solved, however I cannot figure out how to click on action bar tabs with Robotium.

推荐答案

您可以使用

[1] solo.clickOnText("TAB A"); 
    // click on action bar tab 1
    // where action bar tab 1 diaplay text = "TAB A"

[2] solo.clickOnText("TAB A"); 
    // click on action bar tab 1
    // where action bar tab 1 diaplay text = "TAB A"

如果您在操作栏中的标签图像,

if you have images in action bar tabs,

[1] solo.clickOnImage(0); OR solo.clickOnImageButton(0);
        // click on action bar tab 1

[2] solo.clickOnImage(1); OR solo.clickOnImageButton(1); 
        // click on action bar tab 2

我希望这会帮助你。谢谢你。

i hope this will help you. Thanks.

这篇关于robotium - 上点击操作栏选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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