@@ -12,7 +12,7 @@ const KEY = process.env.LT_ACCESS_KEY || "accessKey";
12
12
// gridUrl: gridUrl can be found at automation dashboard
13
13
//const GRID_HOST = process.env.GRID_HOST || "@hub.sushobhit.dev.lambdatest.io/wd/hub"; //dev
14
14
const GRID_HOST =
15
- process . env . GRID_HOST || "@hub.lambdatest.com/wd/hub" ; //connect to lambdatest hub
15
+ process . env . GRID_HOST || "@hub.lambdatest.com/wd/hub" ; //connect to lambdatest hub
16
16
17
17
async function searchTextOnGoogle ( ) {
18
18
var keys = process . argv ;
@@ -34,32 +34,34 @@ async function searchTextOnGoogle() {
34
34
"accessKey" : KEY ,
35
35
name : "test session" , // name of the test
36
36
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
37
+ "LT:Options" : {
38
+ "smartUI.project" : "smartuigithub" ,
39
+ // will generate random smartUI build if not specified
40
+ // "smartUI.build": "first",
41
+ "smartUI.options" : {
42
+ "output" : {
43
+ "errorColor" : {
44
+ "red" : 200 ,
45
+ "green" : 0 ,
46
+ "blue" : 255
47
+ } ,
48
+ "errorType" : "movement" ,
49
+ "transparency" : 0.3 ,
50
+ "largeImageThreshold" : 100 ,
51
+ "useCrossOrigin" : false ,
52
+ "outputDiff" : true
46
53
} ,
47
- "errorType" : "movement" ,
48
- "transparency" : 0.3 ,
49
- "largeImageThreshold" : 100 ,
50
- "useCrossOrigin" : false ,
51
- "outputDiff" : true
52
- } ,
53
- "scaleToSameSize" : true ,
54
- "ignore" : "antialiasing"
54
+ "scaleToSameSize" : true ,
55
+ "ignore" : "antialiasing"
56
+ }
55
57
}
56
58
} ;
57
59
58
60
//add github app capabilities
59
61
let githubURL = process . env . GITHUB_URL
60
- if ( githubURL ) {
62
+ if ( githubURL ) {
61
63
capabilities . github = {
62
- url :githubURL
64
+ url : githubURL
63
65
}
64
66
}
65
67
@@ -104,7 +106,10 @@ async function startTest(gridUrl, capabilities, name) {
104
106
// For Smartui TakeScreenshot
105
107
setTimeout ( function ( ) {
106
108
console . log ( "taking screenshot ..." )
107
- driver . executeScript ( `smartui.takeScreenshot,{"screenshotName":"web-page"}` ) . then ( out => {
109
+ let config = {
110
+ screenshotName : "web-page"
111
+ } ;
112
+ driver . executeScript ( "smartui.takeScreenshot" , config ) . then ( out => {
108
113
console . log ( "RESPONSE :" , out )
109
114
return
110
115
} ) ;
0 commit comments