zoukankan      html  css  js  c++  java
  • verify the text views its easy to use getView from the adapter

    If you just need to verify the text views its easy to use getView from the
    adapter.  If you need to click on the view, the best approach for me was to
    use solo.sendKey(Solo.DOWN) the correct number of times to select the item
    in the list that you want, and then use solo.getCurrentTextViews().

    for example:
        protected void selectAdapterItem(LnSolo solo, int i, Event event){
            scrollToTop(solo);
            ListView listView = solo.getCurrentListViews().get(0);

    while(MobilUtils.searchParentForText(listView.getSelectedView(),"Popular")!­=null){
                solo.sendKey(Solo.UP);
                listView =  solo.getCurrentListViews().get(0);
            }

           MobilUtils.currentEvent=event;
           for(int x=0;x<i+2;x++){
               solo.sendKey(Solo.DOWN);
           }

            listView = solo.getCurrentListViews().get(0);

           solo.clickOnView(listView.getSelectedView());
           solo.waitForText(MobilUtils.currentEvent.getTitle());

        }

    This is not generalized, and copied right from my testing library for a
    specific app, but you get the idea.
  • 相关阅读:
    Hrbust-1492 盒子(二分图最大匹配)
    数据结构——二叉树的建立和遍历(递归建树&层序遍历建树)
    HDU 1710 二叉树遍历
    HDU 2891
    HDU 2895 贪心 还是 大水题
    POJ 2896 另解暴力
    POJ 2896 AC自动机 or 暴力
    HDU 1714 math
    POJ 1328 贪心
    POJ 2109 巧妙解法
  • 原文地址:https://www.cnblogs.com/ccxniit2004/p/2314557.html
Copyright © 2011-2022 走看看