A simple and easy library to manage Mobile Devices hosted in the SeeTest Cloud.
A .NetStandard v2.0 / .NetFramework v4.5.2 project
SeeTestCloud Access
Right Click on your project in the visual studio solution explorer->Manage nuget packages-> Search for SeeTestCloudAPI -> Select SeeTestCloudAPI By Meganathan from the list -> Select project -> Install.
Gathering dependency information may take a minute or more.
Import "SeeTestCloudAPI".
using SeeTestCloudAPI;
Create a new instance of CloudAPIClient with the SeeTest Cloud server URL and credentials(Token / Username & Password)
CloudAPIClient client = new CloudAPIClient("CloudServerURL", "AccessToken");
CloudServerURL = The URL where the SeeTestCloud server is configured.
AccessToken = Login to SeeTestCloud->User Icon->Get Access Key->Copy.
e.g. CloudAPIClient client = new CloudAPIClient("https://xxxxx.com", "xxxxxxxxxxx");
Use the created instance to call the available methods.
e.g.
client.GetAvailableDevicesNames();
client.PrintAllDevicesImportantInformation();
To use Device specific methods, Device ID(Assigned by SeeTestCloud) is required. Use GetDeviceID() method to get the Device ID.
// Use UDID of a Device to get Device ID.
int DeviceID = client.GetDeviceID(string UDID); // iOS - UDID; Android - Serial number.
OR
// Use Queries to filter the device and Get Device ID.
Dictionary<Keys, string> SearchQuery = new Dictionary<Keys, string>();
SearchQuery.Add(Keys.agentLocation, "Bangalore"); // Keys is a enum which will have all the keys. So, just need to type "Keys." -> will list out all the keys.
SearchQuery.Add(Keys.deviceOs, "android");
SearchQuery.Add(Keys.displayStatus, "available");
SearchQuery.Add(Keys.model, "Nexus 5X");
int DeviceID = client.GetDeviceID(SearchQuery);
OR
// Use below method to print all the device's Location,DeviceName,DeviceOS,OSVersion,CurrentStatus,DeviceID and UDID details in the console.
client.PrintAllDevicesImportantInformation();
Use the Device ID in the Device specific methods.
e.g.
client.ReserveDevice(DeviceID, "2020-07-13-16-30-00", "2020-07-13-16-30-00", "2020-07-13-16-50-00"); // Will Reserve the device and will return the response as string.
No much information added here about the methods since all the methods are having description and parameter info which will be displayed while using the methods.
AddDeviceTag()
EditDevice()
GetAllDevices() (+ 3 overloads)
GetAvailableDevicesIDs() (+ 1 overload) - Added in v1.2.0
GetAvailableDevicesNames() (+ 1 overload)
GetAvailableDevicesNamesWithDetails() (+ 1 overload)
GetDevice() (+ 2 overloads)
GetDeviceID() (+ 1 overload)
GetDeviceIDList() - Added in v1.2.0
GetDeviceiOSConfigurationProfiles()
GetDeviceReservations()
GetDeviceTags()
GetOnlineDevicesIDs() (+ 1 overload) - Added in v1.2.0
GetOnlineDevicesNames() (+ 1 overload)
PrintAllDevicesImportantInformation()
RebootDevice()
ReleaseDevice()
RemoveAllTagsOfDevice()
RemoveDeviceTag()
ReserveDevice()
ReserveMultipleDevices()
ResetUSBConnection()
StartWebControl() (+ 3 overloads) - Added two new methods in v1.1.0
More methods will be added in the future releases.
- SeeTestCloud APIs - The Official Raw Rest APIs
- Restsharp - API Management
- Newtonsoft.Json - Json Management
- Clone the Repo
- Make changes
- Create a pull request
This project is licensed under the MIT License