Skip to content

Commit b16e6f0

Browse files
committed
Smart UI Sample added
1 parent baec7e7 commit b16e6f0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/test/java/com/lambdatest/TestNGTodo2.java

+14
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ public void setup(Method m, ITestContext ctx) throws MalformedURLException {
2323
String username = System.getenv("LT_USERNAME") == null ? "Your LT Username" : System.getenv("LT_USERNAME");
2424
String authkey = System.getenv("LT_ACCESS_KEY") == null ? "Your LT AccessKey" : System.getenv("LT_ACCESS_KEY");
2525
;
26+
27+
/*
28+
Steps to run Smart UI project (https://beta-smartui.lambdatest.com/)
29+
Step - 1 : Change the hub URL to @beta-smartui-hub.lambdatest.com/wd/hub
30+
Step - 2 : Add "smartUI.project": "<Project Name>" as a capability above
31+
Step - 3 : Add "((JavascriptExecutor) driver).executeScript("smartui.takeScreenshot");" code wherever you need to take a screenshot
32+
Note: for additional capabilities navigate to https://www.lambdatest.com/support/docs/test-settings-options/
33+
*/
34+
2635
String hub = "@hub.lambdatest.com/wd/hub";
2736

2837
DesiredCapabilities caps = new DesiredCapabilities();
@@ -33,6 +42,11 @@ public void setup(Method m, ITestContext ctx) throws MalformedURLException {
3342
caps.setCapability("name", m.getName() + this.getClass().getName());
3443
caps.setCapability("plugin", "git-testng");
3544

45+
/*
46+
Enable Smart UI Project
47+
caps.setCapability("smartUI.project", "<Project Name Java>");
48+
*/
49+
3650
String[] Tags = new String[] { "Feature", "Magicleap", "Severe" };
3751
caps.setCapability("tags", Tags);
3852

0 commit comments

Comments
 (0)