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
參數
- nativeElement
型別:System.Object
要用來建立新 UITestControl 的原生項目參考。
- technologyName
型別:System.String
建立新 UITestControl 時要使用的技術名稱。
傳回值
型別:Microsoft.VisualStudio.TestTools.UITesting.UITestControl
新的 UITestControl,來自指定的原生項目資訊。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。