@@ -10,9 +10,7 @@ const USERNAME = process.env.LT_USERNAME || "username";
1010const KEY = process . env . LT_ACCESS_KEY || "accessKey" ;
1111
1212// gridUrl: gridUrl can be found at automation dashboard
13- //const GRID_HOST = process.env.GRID_HOST || "@hub.sushobhit.dev.lambdatest.io/wd/hub"; //dev
14- const GRID_HOST =
15- process . env . GRID_HOST || "@hub.lambdatest.com/wd/hub" ; //connect to lambdatest hub
13+ const GRID_HOST = process . env . GRID_HOST || "@hub.lambdatest.com/wd/hub" ; //connect to lambdatest hub
1614
1715async function searchTextOnGoogle ( ) {
1816 var keys = process . argv ;
@@ -34,32 +32,34 @@ async function searchTextOnGoogle() {
3432 "accessKey" : KEY ,
3533 name : "test session" , // name of the test
3634 build : platform + browserName + version , // name of the build
37- "smartUI.project" : "smartuigithub" ,
38- // will generate random smartUI build if not specified
39- // "smartUI.build": "first",
40- "smartUI.options" : {
41- "output" : {
42- "errorColor" : {
43- "red" : 200 ,
44- "green" : 0 ,
45- "blue" : 255
35+ "LT:Options" : {
36+ "smartUI.project" : "smartuigithub" ,
37+ // will generate random smartUI build if not specified
38+ // "smartUI.build": "first",
39+ "smartUI.options" : {
40+ "output" : {
41+ "errorColor" : {
42+ "red" : 200 ,
43+ "green" : 0 ,
44+ "blue" : 255
45+ } ,
46+ "errorType" : "movement" ,
47+ "transparency" : 0.3 ,
48+ "largeImageThreshold" : 100 ,
49+ "useCrossOrigin" : false ,
50+ "outputDiff" : true
4651 } ,
47- "errorType" : "movement" ,
48- "transparency" : 0.3 ,
49- "largeImageThreshold" : 100 ,
50- "useCrossOrigin" : false ,
51- "outputDiff" : true
52- } ,
53- "scaleToSameSize" : true ,
54- "ignore" : "antialiasing"
52+ "scaleToSameSize" : true ,
53+ "ignore" : "antialiasing"
54+ }
5555 }
5656 } ;
5757
5858 //add github app capabilities
5959 let githubURL = process . env . GITHUB_URL
60- if ( githubURL ) {
60+ if ( githubURL ) {
6161 capabilities . github = {
62- url :githubURL
62+ url : githubURL
6363 }
6464 }
6565
@@ -104,7 +104,10 @@ async function startTest(gridUrl, capabilities, name) {
104104 // For Smartui TakeScreenshot
105105 setTimeout ( function ( ) {
106106 console . log ( "taking screenshot ..." )
107- driver . executeScript ( `smartui.takeScreenshot,{"screenshotName":"web-page"}` ) . then ( out => {
107+ let config = {
108+ screenshotName : "web-page"
109+ } ;
110+ driver . executeScript ( "smartui.takeScreenshot" , config ) . then ( out => {
108111 console . log ( "RESPONSE :" , out )
109112 return
110113 } ) ;
0 commit comments