共用方式為


UITechnologyElement.GetNativeControlType 方法

傳回這個項目的原生控制項類型。

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

語法

'宣告
Public MustOverride Function GetNativeControlType ( _
    nativeControlTypeKind As NativeControlTypeKind _
) As Object
public abstract Object GetNativeControlType(
    NativeControlTypeKind nativeControlTypeKind
)
public:
virtual Object^ GetNativeControlType(
    NativeControlTypeKind nativeControlTypeKind
) abstract
abstract GetNativeControlType : 
        nativeControlTypeKind:NativeControlTypeKind -> Object 
public abstract function GetNativeControlType(
    nativeControlTypeKind : NativeControlTypeKind
) : Object

參數

傳回值

型別:System.Object
如果支援,則為原生類型的控制項,否則為 nullnull 參考 (即 Visual Basic 中的 Nothing)。

實作

IUITechnologyElement.GetNativeControlType(NativeControlTypeKind)

備註

當單單只有 ControlTypeName 已不足以區分控制項的情況下,這個 GetNativeControlType 方法會與使用 ControlTypeName 取得的通用型別串聯在一起使用。例如,如果原生技術為 HTML,這個方法便可能傳回標籤名稱。

.NET Framework 安全性

請參閱

參考

UITechnologyElement 類別

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

ControlTypeName