public boolean waitForFragmentById(int id, int timeout)Waits for a Fragment matching the specified resource id。Parameters:id - the R。id of the fragmenttimeout - the amount of time in milliseconds to waitReturns:true if fragment appears and false if it does not appear before the timeoutwaitForLogMessage
public boolean waitForLogMessage(String logMessage)Waits for the specified log message to appear。 Default timeout is 20 seconds。 Requires read logs permission (android。
permission。READ_LOGS) in AndroidManifest。xml of the application under test。Parameters:logMessage - the log message to wait forReturns:true if log message appears and false if it does not appear before the timeoutSee Also:clearLog()waitForLogMessage
public boolean waitForLogMessage(String logMessage, int timeout)Waits for the specified log message to appear。 Requires read logs permission (android。permission。READ_LOGS) in AndroidManifest。xml of the application under test。Parameters:logMessage - the log message to wait fortimeout - the amount of time in milliseconds to waitReturns:true if log message appears and false if it does not appear before the timeoutSee Also:clearLog()clearLog
public void clearLog()Clears the log。
getString
public String getString(int id)Returns a localized String matching the specified resource id。Parameters:id - the R。id of the StringReturns:the localized StringgetString
public boolean isSpinnerTextSelected(String text)Returns a localized String matching the specified resource id。Parameters:id - the id of the StringReturns:the localized Stringsleep
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-37529-38.html
1800~1900两千往上的风险比较大