共用方式為


UITestControlFactory.FromNativeElement 方法

從指定的原生項目資訊傳回新的 UITestControl

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

語法

'宣告
Public Shared Function FromNativeElement ( _
    nativeElement As Object, _
    technologyName As String _
) As UITestControl
public static UITestControl FromNativeElement(
    Object nativeElement,
    string technologyName
)
public:
static UITestControl^ FromNativeElement(
    Object^ nativeElement, 
    String^ technologyName
)
static member FromNativeElement : 
        nativeElement:Object * 
        technologyName:string -> UITestControl 
public static function FromNativeElement(
    nativeElement : Object, 
    technologyName : String
) : UITestControl

參數

傳回值

型別:Microsoft.VisualStudio.TestTools.UITesting.UITestControl
新的 UITestControl,來自指定的原生項目資訊。

.NET Framework 安全性

請參閱

參考

UITestControlFactory 類別

Microsoft.VisualStudio.TestTools.UITesting 命名空間