蠡机器人,只要点击一个ListView? [英] Calabash android, as clicking a ListView?

查看:140
本文介绍了蠡机器人,只要点击一个ListView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找互联网上的答案,但无法找到它。请帮帮我。
如何使pressing在葫芦,Android的列表项?

I've been looking for the answer on the Internet, but could not find it. help me please. How to make pressing the list item in Calabash-Android?

推荐答案

尝试了这一点。

添加一个定义红宝石步文件。

Add a definition to ruby step file.

Then /^I scroll to cell with "([^\"]*)" label and touch it$/ do |name|
    element="TextView text:'#{name}'"      
    if !element_exists(element)
        wait_poll(:until_exists => "TextView text:'#{name}'", :timeout => WAIT_TIMEOUT) do
            performAction('scroll_down')
        end
        if element_exists(element)
            touch(element)
            sleep(STEP_PAUSE)
        else
            screenshot_and_raise "could not find the cell"
        end
        else
            touch(element)
            sleep(STEP_PAUSE)
        end
end

和来自特征文件称之为然后我滚动到细胞与cellMainLabel的标签并触摸

and call it from feature file Then I scroll to cell with "cellMainLabel" label and touch it

这篇关于蠡机器人,只要点击一个ListView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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