共用方式為


IUITechnologyManager.MatchElement 方法

這個應用程式開發介面支援 .NET Framework 基礎結構,但您不可以直接在程式碼中使用它。

傳回值,這個值表示提供的項目是否符合先前剖析的查詢 ID Cookie。

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

語法

'宣告
Function MatchElement ( _
    element As IUITechnologyElement, _
    parsedQueryIdCookie As Object, _
    <OutAttribute> ByRef useEngine As Boolean _
) As Boolean
bool MatchElement(
    IUITechnologyElement element,
    Object parsedQueryIdCookie,
    out bool useEngine
)
bool MatchElement(
    IUITechnologyElement^ element, 
    Object^ parsedQueryIdCookie, 
    [OutAttribute] bool% useEngine
)
abstract MatchElement : 
        element:IUITechnologyElement * 
        parsedQueryIdCookie:Object * 
        useEngine:bool byref -> bool
function MatchElement(
    element : IUITechnologyElement, 
    parsedQueryIdCookie : Object, 
    useEngine : boolean
) : boolean

參數

  • parsedQueryIdCookie
    類型:Object

    Object,代表先前剖析之 IQueryElement 的 Cookie。

  • useEngine
    類型:Boolean%

    (輸出) 布林值,指出此技術管理員選擇使用測試架構比對所有或部分的查詢項目。

傳回值

類型:Boolean
如果項目符合查詢項目則為 true,否則為 false。

例外狀況

例外狀況 條件
NotSupportedException

此技術管理員不支援這個方法。

.NET Framework 安全性

請參閱

參考

IUITechnologyManager 介面

Microsoft.VisualStudio.TestTools.UITest.Extension 命名空間

IUITechnologyElement

IQueryElement