Default timeout is 20 seconds。Returns:true if the Dialog is closed before the timeout and false if it is not closedwaitForDialogToOpen
public boolean waitForDialogToOpen(long timeout)Waits for a Dialog to open。Parameters:timeout - the amount of time in milliseconds to waitReturns:true if the Dialog is opened before the timeout and false if it is not openedwaitForDialogToClose
public boolean waitForDialogToClose(long timeout)Waits for a Dialog to close。Parameters:timeout - the amount of time in milliseconds to waitReturns:true if the Dialog is closed before the timeout and false if it is not closedgoBack
public void goBack()Simulates pressing the hardware back key。
clickOnScreen
public void clickOnScreen(float x, float y)Clicks the specified coordinates。Parameters:x - the x coordinatey - the y coordinateclickOnScreen
public void clickOnScreen(float x, float y, int numberOfClicks)Clicks the specified coordinates rapidly a specified number of times。 Requires API level >= 14。Parameters:x - the x coordinatey - the y coordinatenumberOfClicks - the number of clicks to performclickLongOnScreen
public void clickLongOnScreen(float x, float y)Long clicks the specified coordinates。Parameters:x - the x coordinatey - the y coordinateclickLongOnScreen
public void clickLongOnScreen(float x, float y, int time)Long clicks the specified coordinates for a specified amount of time。
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-37529-14.html
淘宝队像狮子一样赢了