Silk Mobile

Table of Contents (Homepage)

Comment

Comment(Comment)

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

images/images/os-icons/os_windows_150x150.png

images/images/os-icons/os_blackberry_150x150.png

images/images/os-icons/os_symbian02_150x150.png

images/images/os-icons/os_windows_mobile_150x150.png

Description

This command gives you the option to add free-writing comment lines in the Silk Mobile commands tab.

Note: The comments will also be exported to all 3rd party code environments.

Parameters

  • Comment

Usage

Example: (The arrows point to the comment lines):

images/download/attachments/3310194/17.jpg

Code Examples

Java Example
@Test
public void testUntitled(){
client.setDevice("adb:Nexus 10");
// Launch app:
client.launch("com.experitest.ExperiBank/.LoginActivity", true, false);
// Enter credentials and login
client.elementSendText("NATIVE", "id=usernameTextField", 0, "company");
client.elementSendText("NATIVE", "id=passwordTextField", 0, "company");
client.click("NATIVE", "id=loginButton", 0, 1);
}
C# Example
[Test]
public void TestUntitled()
{
client.SetDevice("adb:Nexus 10");
// Launch app:
client.Launch("com.experitest.ExperiBank/.LoginActivity", true, false);
// Enter credentials and login
client.ElementSendText("NATIVE", "id=usernameTextField", 0, "company");
client.ElementSendText("NATIVE", "id=passwordTextField", 0, "company");
client.Click("NATIVE", "id=loginButton", 0, 1);
}
VBScript Example
Set client = DotNetFactory.CreateInstance("experitestClient.Client", "C:\\Users\\user_12\\Desktop\\8.5.61\\silkmobile\\clients\\C#\\imageClient.dll", "127.0.0.1", 8889, true)
client.SetProjectBaseDirectory "C:\\Users\\user_12\\workspace\\project2"
client.SetDevice "adb:Nexus 10"
Report
' Launch app:
client.Launch "com.experitest.ExperiBank/.LoginActivity", true, false
Report
' Enter credentials and login
client.ElementSendText "NATIVE", "id=usernameTextField", 0, "company"
Report
client.ElementSendText "NATIVE", "id=passwordTextField", 0, "company"
Report
client.Click "NATIVE", "id=loginButton", 0, 1
Report
Python Example
def testUntitled(self):
self.client.setDevice("adb:Nexus 10")
# Launch app:
self.client.launch("com.experitest.ExperiBank/.LoginActivity", True, False)
# Enter credentials and login
self.client.elementSendText("NATIVE", "id=usernameTextField", 0, "company")
self.client.elementSendText("NATIVE", "id=passwordTextField", 0, "company")
self.client.click("NATIVE", "id=loginButton", 0, 1)
Perl Example
$client->setDevice("adb:Nexus 10");
# Launch app:
$client->launch("com.experitest.ExperiBank/.LoginActivity", 1, 0);
# Enter credentials and login
$client->elementSendText("NATIVE", "id=usernameTextField", 0, "company");
$client->elementSendText("NATIVE", "id=passwordTextField", 0, "company");
$client->click("NATIVE", "id=loginButton", 0, 1);