Thursday 9 March 2023

 Confiuring VSCode For Protractor Execution- 

Create launch.json file, this file should be under .vscode folder.

launch.json file should have reference to runner tool in program attribute and args attribute should contain the parameters for program attribute. 

Run command would refer lanunch.json for parameters used for execution

Typically, it should like as below - 

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version""0.2.0",
    "configurations": [
        

        {
            "type""pwa-node",          
            "request""launch",
            "name""Protractor Runner",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "program""${env:APPDATA}/npm/node_modules/protractor/bin/protractor",
            "args": ["${workspaceFolder}/conf/conf_Jenkins.js"]
            /*
            "args": [
                "-c", "/Users/xyz/config",
                "-p", "2012"
            */
        }
    ]
}