Skip to content

Commit 2db9d5b

Browse files
authored
Merge pull request #56 from LambdaTest/APML-212
headless support
2 parents 9bf4a55 + 21680d9 commit 2db9d5b

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

commands/utils/default_config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module.exports = {
2323
ignore_files: "",
2424
feature_file_suppport: false,
2525
network: false,
26+
headless: false,
2627
reporter_config_file: ""
2728
},
2829
tunnel_settings: {

commands/utils/set_args.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,16 @@ function sync_args_from_cmd(args) {
235235
} else if (!lt_config["run_settings"]["network"]) {
236236
lt_config["run_settings"]["network"] = false;
237237
}
238+
239+
if ("headless" in args) {
240+
console.log("headlesss in args - value", args["headless"]);
241+
lt_config["run_settings"]["headless"] = args["headless"]
242+
} else if (!lt_config["run_settings"]["headless"]) {
243+
console.log("headless not present in lt config")
244+
lt_config["run_settings"]["headless"] = false;
245+
}
246+
247+
238248
//get specs from current directory if specs are not passed in config or cli
239249
if (
240250
(lt_config["run_settings"]["specs"] == undefined ||

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ const argv = require("yargs")
8787
describe: "Tunnel Auto Start",
8888
type: "string",
8989
})
90+
.option("headless", {
91+
alias: "headless",
92+
describe: "Run in headless mode",
93+
type: "boolean",
94+
})
9095
.option("net", {
9196
alias: "network",
9297
describe: "Capture Network logs",

0 commit comments

Comments
 (0)