Silk Mobile

Table of Contents (Homepage)

SetNetworkConditions

SetNetworkConditions(Profile)

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

Description

Command to select the profile configured on the Network Virutlaizaiont server to test the device under the different network conditions.

Parameters

  • Profile: Different network conditions profile which was created in NetworkVirtualization Tool.

Note: Parameter set to None - means default profile without network conditions

Usage

  1. Selecting the Profile:
    Following is the NetworkVirtualization web portal. On the Profiles tab there is the list of profiles that are available on the Server.

    images/download/attachments/3309761/1.jpg

    Same profiles should be available on the Silk Mobile. User can choose any of the give profiles on the list.

    images/download/attachments/3309761/2.jpg
  2. Setting the device. In this case, android device - SM-G900F

  3. Selecting the profile using SetNetworkConditions command. In the following example it is the profile networkdemo.

    Note: Use the Launch command to launch google.com on chrome.

    images/download/attachments/3309761/3.jpg
    images/download/attachments/3309761/4.jpg

Code Examples

Java Example
client.setNetworkConditions("networkDemo");
C# Example
client.SetNetworkConditions("networkDemo");
VBScript Example
client.SetNetworkConditions "networkDemo"
Python Example
self.client.setNetworkConditions("networkDemo")
Perl Example
$client->setNetworkConditions("networkDemo");