共用方式為


IUITechnologyElement.GetQueryIdForRelatedElement 方法

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

語法

'宣告
Function GetQueryIdForRelatedElement ( _
    relatedElement As UITestElementKind, _
    additionalInfo As Object, _
    <OutAttribute> ByRef maxDepth As Integer _
) As String
string GetQueryIdForRelatedElement(
    UITestElementKind relatedElement,
    Object additionalInfo,
    out int maxDepth
)
String^ GetQueryIdForRelatedElement(
    UITestElementKind relatedElement, 
    Object^ additionalInfo, 
    [OutAttribute] int% maxDepth
)
abstract GetQueryIdForRelatedElement : 
        relatedElement:UITestElementKind * 
        additionalInfo:Object * 
        maxDepth:int byref -> string
function GetQueryIdForRelatedElement(
    relatedElement : UITestElementKind, 
    additionalInfo : Object, 
    maxDepth : int
) : String

參數

  • additionalInfo
    類型:Object

    任何必要的其他資訊。 例如,如果 relatedElement 為 Child,則此參數會包含子項目的名稱。

  • maxDepth
    類型:Int32%

    搜尋相關項目的最大深度層級。

傳回值

類型:String
相關項目的查詢 ID。

.NET Framework 安全性

請參閱

參考

IUITechnologyElement 介面

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

UITestElementKind