robotium_robotium使用基础_robotium api(17)

电脑杂谈  发布时间:2017-03-14 21:02:58  来源:网络整理
public void pressSoftKeyboardSearchButton()
Presses the soft keyboard search button。pressSpinnerItem
public void pressSpinnerItem(int spinnerIndex,                             int itemIndex)
Presses a Spinner (drop-down menu) item。Parameters:spinnerIndex - the index of the Spinner menu to useitemIndex - the index of the Spinner item to press relative to the currently selected item。

A Negative number moves up on the Spinner, positive moves downclickOnView

public void clickOnView(android.view.View view)
Clicks the specified View。Parameters:view - the View to clickclickOnView
public void clickOnView(android.view.View view,                        boolean immediately)
Clicks the specified View。Parameters:view - the View to clickimmediately - true if View should be clicked without any waitclickLongOnView
public void clickLongOnView(android.view.View view)
Long clicks the specified View。Parameters:view - the View to long clickclickLongOnView
public void clickLongOnView(android.view.View view,                            int time)
Long clicks the specified View for a specified amount of time。Parameters:view - the View to long clicktime - the amount of time to long clickclickOnText
public void clickOnText(String text)
Clicks a View or WebElement displaying the specified text。

Will automatically scroll when needed。Parameters:text - the text to click。 The parameter will be interpreted as a regular expressionclickOnText

public void clickOnText(String text,                        int match)
Clicks a View or WebElement displaying the specified text。 Will automatically scroll when needed。Parameters:text - the text to click。 The parameter will be interpreted as a regular expressionmatch - if multiple objects match the text, this determines which one to clickclickOnText


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-37529-17.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 平儿
      平儿

      让得意的人有一丝谦卑和体会生命的失意

    热点图片
    拼命载入中...