共用方式為


UITechnologyElement.QueryId 屬性

取得可用以唯一識別及尋找這個項目的識別碼物件。

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

語法

'宣告
Public MustOverride ReadOnly Property QueryId As IQueryElement
public abstract IQueryElement QueryId { get; }
public:
virtual property IQueryElement^ QueryId {
    IQueryElement^ get () abstract;
}
abstract QueryId : IQueryElement with get
abstract function get QueryId () : IQueryElement

屬性值

型別:Microsoft.VisualStudio.TestTools.UITest.Extension.IQueryElement
查詢識別碼。

實作

IUITechnologyElement.QueryId

備註

在某些情況下,QueryId 包含完整的項目階層架構,但在多數情況下,它只包含項目的重要祖系。技術管理員必須決定要擷取的是哪個祖系階層透過適當設定每個項目 IQueryElement.Ancestor 屬性。

AndCondition.ToStringAndCondition.Parse 之類的條件類別中的 API,可用來將這個項目類別轉換成字串,或是從字串建立這個項目的執行個體。

.NET Framework 安全性

請參閱

參考

UITechnologyElement 類別

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

IQueryElement

QueryElement

QueryCondition