获取toast值

/**
* 获取Toast的String值
* @return
*/
public String getToast(int timeout){
TextView toastTextView = null;
String toastText = "";
long endTime = SystemClock.uptimeMillis() + timeout;
while(SystemClock.uptimeMillis() < endTime){
toastTextView = (TextView) solo.getView("message", 0);
if(null != toastTextView){
toastText = toastTextView.getText().toString();
break;
}else {
solo.sleep(10);
}
}

原网址链接:http://www.2cto.com/kf/201502/374776.html

原文地址:https://www.cnblogs.com/qingo/p/5783704.html