Skip to content

Commit be04980

Browse files
committed
Updated Annotation
1 parent bff919c commit be04980

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/test/java/com/lambdatest/TestNGTodo1.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ public void setup(Method m, ITestContext ctx) throws MalformedURLException {
3131
caps.setCapability("version", "latest");
3232
caps.setCapability("build", "TestNG With Java");
3333
caps.setCapability("name", m.getName() + " - " + this.getClass().getName());
34-
caps.setCapability("plugin", "git-testng");
34+
caps.setCapability("project", "git-testng");
3535

3636
String[] Tags = new String[] { "Feature", "Falcon", "Severe" };
37+
3738
caps.setCapability("tags", Tags);
3839

3940
driver = new RemoteWebDriver(new URL("https://" + username + ":" + authkey + hub), caps);
@@ -44,9 +45,12 @@ public void setup(Method m, ITestContext ctx) throws MalformedURLException {
4445
public void basicTest() throws InterruptedException {
4546
String spanText;
4647
System.out.println("Loading Url");
48+
driver.executeScript("lambdatest_executor: {\"action\": \"stepcontext\", \"arguments\": {\"data\": \"Opening WebApp\", \"level\": \"info\"}}");
4749

4850
driver.get("https://lambdatest.github.io/sample-todo-app/");
4951

52+
driver.executeScript("lambdatest_executor: {\"action\": \"stepcontext\", \"arguments\": {\"data\": \"Checking List Items\", \"level\": \"info\"}}");
53+
5054
System.out.println("Checking Box");
5155
driver.findElement(By.name("li1")).click();
5256

@@ -59,6 +63,8 @@ public void basicTest() throws InterruptedException {
5963
System.out.println("Checking Another Box");
6064
driver.findElement(By.name("li4")).click();
6165

66+
driver.executeScript("lambdatest_executor: {\"action\": \"stepcontext\", \"arguments\": {\"data\": \"Adding Items\", \"level\": \"info\"}}");
67+
6268
driver.findElement(By.id("sampletodotext")).sendKeys(" List Item 6");
6369
driver.findElement(By.id("addbutton")).click();
6470

@@ -68,6 +74,8 @@ public void basicTest() throws InterruptedException {
6874
driver.findElement(By.id("sampletodotext")).sendKeys(" List Item 8");
6975
driver.findElement(By.id("addbutton")).click();
7076

77+
driver.executeScript("lambdatest_executor: {\"action\": \"stepcontext\", \"arguments\": {\"data\": \"Checking More Items\", \"level\": \"info\"}}");
78+
7179
System.out.println("Checking Another Box");
7280
driver.findElement(By.name("li1")).click();
7381

@@ -81,6 +89,7 @@ public void basicTest() throws InterruptedException {
8189
driver.findElement(By.name("li8")).click();
8290
Thread.sleep(300);
8391

92+
driver.executeScript("lambdatest_executor: {\"action\": \"stepcontext\", \"arguments\": {\"data\": \"Adding and Verify List Items\", \"level\": \"info\"}}");
8493
System.out.println("Entering Text");
8594
driver.findElement(By.id("sampletodotext")).sendKeys("Get Taste of Lambda and Stick to It");
8695

@@ -102,6 +111,7 @@ public void basicTest() throws InterruptedException {
102111

103112
@AfterMethod
104113
public void tearDown() {
114+
driver.executeScript("lambdatest_executor: {\"action\": \"stepcontext\", \"arguments\": {\"data\": \"Adding Test Result and Closing Browser\", \"level\": \"info\"}}");
105115
driver.executeScript("lambda-status=" + Status);
106116
driver.quit();
107117
}

0 commit comments

Comments
 (0)