@@ -10,9 +10,7 @@ const USERNAME = process.env.LT_USERNAME || "username";
10
10
const KEY = process . env . LT_ACCESS_KEY || "accessKey" ;
11
11
12
12
// 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
16
14
17
15
async function searchTextOnGoogle ( ) {
18
16
var keys = process . argv ;
@@ -34,32 +32,34 @@ async function searchTextOnGoogle() {
34
32
"accessKey" : KEY ,
35
33
name : "test session" , // name of the test
36
34
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
46
51
} ,
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
+ }
55
55
}
56
56
} ;
57
57
58
58
//add github app capabilities
59
59
let githubURL = process . env . GITHUB_URL
60
- if ( githubURL ) {
60
+ if ( githubURL ) {
61
61
capabilities . github = {
62
- url :githubURL
62
+ url : githubURL
63
63
}
64
64
}
65
65
@@ -104,7 +104,10 @@ async function startTest(gridUrl, capabilities, name) {
104
104
// For Smartui TakeScreenshot
105
105
setTimeout ( function ( ) {
106
106
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 => {
108
111
console . log ( "RESPONSE :" , out )
109
112
return
110
113
} ) ;
0 commit comments