how test separate environmental name with protractor conf js?

前端 未结 2 1285
自闭症患者
自闭症患者 2021-01-28 13:04

[\"enter

The above pic i am run protractor Conf.js with particular environmental name whi

2条回答
  •  一生所求
    2021-01-28 13:11

    To use only in one place a URL from json:

    var jsonFile = require("./path/to/json/relative/to/currentRunFolder");
    urlToUse = jsonFile.url; // or however you stored it.
    

    use it in any spec, and you can change the json file every run. I hope i understood correctly.

    To pass parameters to protractor, use --params.jsonFile="./path/to/json/relative/to/currentRunFolder"

    and again use it as above using browser.params.jsonFile

提交回复
热议问题