Sets the specified device as current for the test commands working with mobile devices. Unlike
TrySetCurrent, this method does not return any value and fails if an attempt to set the current device was unsuccessful.
|Index||[in]||Optional||Integer||Default value: 1|
The method is applied to the following object:
The method has the following parameters:
Specifies the name of the desired device.
Specifies the zero-based index of the device in the collection of devices with the same name.
If the specified device cannot be found or if it cannot be set as current device for mobile testing,
SetCurrent fails and posts an error message to the test log.
The following code example demonstrates how you can set the current device for mobile testing:
Call Mobile.SetCurrent("MyDevice", 1)