public WebElement getWebElement(By by, int index)Returns a WebElement matching the specified By object and index。Parameters:by - the By object。 Examples are: By。id("id") and By。name("name")index - the index of the WebElement。 0 if only one is availableReturns:a WebElement matching the specified indexgetWebUrl
public String getWebUrl()Returns the current web page URL。Returns:the current web page URLgetCurrentViews
public ArrayList getCurrentViews()Returns an ArrayList of the Views currently displayed in the focused Activity or Dialog。
Returns:an ArrayList of the View objects currently displayed in the focused windowgetCurrentViews
publicReturns an ArrayList of Views matching the specified class located in the focused Activity or Dialog。Parameters:classToFilterBy - return all instances of this class。 Examples are: Button。class or ListView。classReturns:an ArrayList of Views matching the specified Class located in the current ActivitygetCurrentViewsArrayList getCurrentViews(Class classToFilterBy)
publicReturns an ArrayList of Views matching the specified class located in the focused Activity or Dialog。ArrayList getCurrentViews(Class classToFilterBy, boolean includeSubclasses)
Parameters:classToFilterBy - return all instances of this class。 Examples are: Button。class or ListView。classincludeSubclasses - include instances of the subclasses in the ArrayList that will be returnedReturns:an ArrayList of Views matching the specified Class located in the current ActivitygetCurrentViews
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-37529-32.html
你老婆也行