共用方式為


UITechnologyManager.MatchElement 方法

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

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

語法

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

參數

  • parsedQueryIdCookie
    類型:Object

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

  • useEngine
    類型:Boolean%

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

傳回值

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

實作

IUITechnologyManager.MatchElement(IUITechnologyElement, Object, Boolean%)

例外狀況

例外狀況 條件
NotSupportedException

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

.NET Framework 安全性

請參閱

參考

UITechnologyManager 類別

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

IUITechnologyElement

IQueryElement