共用方式為


UITestControl.WaitForControlNotExist 方法 (Int32)

封鎖目前的執行緒,直到此控制項不再出現在使用者介面中,或者指定的逾時過期為止。

命名空間:  Microsoft.VisualStudio.TestTools.UITesting
組件:  Microsoft.VisualStudio.TestTools.UITesting (在 Microsoft.VisualStudio.TestTools.UITesting.dll 中)

語法

'宣告
Public Function WaitForControlNotExist ( _
    millisecondsTimeout As Integer _
) As Boolean
public bool WaitForControlNotExist(
    int millisecondsTimeout
)
public:
bool WaitForControlNotExist(
    int millisecondsTimeout
)
member WaitForControlNotExist : 
        millisecondsTimeout:int -> bool 
public function WaitForControlNotExist(
    millisecondsTimeout : int
) : boolean

參數

  • millisecondsTimeout
    型別:System.Int32
    逾時前的毫秒數。

傳回值

型別:System.Boolean
如果這個控制項在逾時前存在則為 true,否則為 false。

備註

在等待作業會導致隱含搜尋或控制項時,例如,當應用程式忙碌中時,實際的等候時間超過指定的逾時會更多。

.NET Framework 安全性

請參閱

參考

UITestControl 類別

WaitForControlNotExist 多載

Microsoft.VisualStudio.TestTools.UITesting 命名空間