Search code examples
node.jsseleniumwebdriverprotractornode-webkit

Running Protractor from Node-webkit


Is is possible to run Protractor in any other way except using CLI?

Is there an API call which will simulate the command: 'protractor config file.js'?

I would like to start a test through a node-webkit application, and even though I can connect directly to the ChromeDriver through the directConnect parameter, this is no use if I can't run protractor from inside the script.

Of course, this is in an environment where Node and Protractor aren't available from CLI... simulating a distribution environment where the user doesn't have to install additional apps apart from my node-webkit (hence the node-webkit usage).

Thank you in advance for any pointers!


Solution

  • The protractor command line script boils down to invoking lib/cli.js which mostly deals with parsing commmand-line arguments and then invokes lib/launcher.js to actually start protractor.

    I don't think any special concessions have been made in these files to be directly invoked programmatically, but I don't see any particular hurdles either.