diff --git a/.gitpod.yml b/.gitpod.yml index 2f1526e..01b3023 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -5,5 +5,5 @@ ports: # List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/config-start-tasks/ tasks: - - init: mvn install -Dsuite=parallel.xml # runs during prebuild + - init: mvn install -Dsuite=annotation.xml # runs during prebuild command: echo 'Please check your test on https://automation.lambdatest.com/' diff --git a/annotation.xml b/annotation.xml new file mode 100644 index 0000000..38a023f --- /dev/null +++ b/annotation.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/test/java/com/lambdatest/TestNGTodo2.java b/src/test/java/com/lambdatest/TestNGTodo2.java index 3530993..568796a 100644 --- a/src/test/java/com/lambdatest/TestNGTodo2.java +++ b/src/test/java/com/lambdatest/TestNGTodo2.java @@ -58,9 +58,12 @@ public void basicTest() throws InterruptedException { String spanText; System.out.println("Loading Url"); + driver.executeScript("lambdatest_executor: {\"action\": \"stepcontext\", \"arguments\": {\"data\": \"Loading URL\", \"level\": \"info\"}}"); driver.get("https://lambdatest.github.io/sample-todo-app/"); System.out.println("Checking Box"); + + driver.executeScript("lambdatest_executor: {\"action\": \"stepcontext\", \"arguments\": {\"data\": \"Marking Checkboxes\", \"level\": \"info\"}}"); driver.findElement(By.name("li1")).click(); System.out.println("Checking Another Box"); @@ -72,6 +75,7 @@ public void basicTest() throws InterruptedException { System.out.println("Checking Another Box"); driver.findElement(By.name("li4")).click(); + driver.executeScript("lambdatest_executor: {\"action\": \"stepcontext\", \"arguments\": {\"data\": \"Adding List Items\", \"level\": \"info\"}}"); driver.findElement(By.id("sampletodotext")).sendKeys(" List Item 6"); driver.findElement(By.id("addbutton")).click(); @@ -81,6 +85,7 @@ public void basicTest() throws InterruptedException { driver.findElement(By.id("sampletodotext")).sendKeys(" List Item 8"); driver.findElement(By.id("addbutton")).click(); + driver.executeScript("lambdatest_executor: {\"action\": \"stepcontext\", \"arguments\": {\"data\": \"Adding List Items\", \"level\": \"warn\"}}"); System.out.println("Checking Another Box"); driver.findElement(By.name("li1")).click(); @@ -93,11 +98,14 @@ public void basicTest() throws InterruptedException { System.out.println("Checking Another Box"); driver.findElement(By.name("li8")).click(); + driver.executeScript("lambdatest_executor: {\"action\": \"stepcontext\", \"arguments\": {\"data\": \"Writing Todo\", \"level\": \"warn\"}}"); System.out.println("Entering Text"); driver.findElement(By.id("sampletodotext")).sendKeys("Get Taste of Lambda and Stick to It"); driver.findElement(By.id("addbutton")).click(); + driver.executeScript("lambdatest_executor: {\"action\": \"stepcontext\", \"arguments\": {\"data\": \"Assert error\", \"level\": \"error\"}}"); + System.out.println("Checking Another Box"); driver.findElement(By.name("li9")).click();