title: How Can I write an AWS Lambda Script that Runs a Protractor / Selenium Browser Automation Script?
body: <p>I am very much enjoying AWS Lambda functions, and I'm wondering if what I want to do here is possible. On my local machine, I have a Protractor config file :</p>
  
  <pre><code>// conf.js
  exports.config = {
    framework: 'jasmine',
    seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
    specs: ['automation-script.js'],
    capabilities: {
      browserName: 'chrome'
    }
  }
  </code></pre>
  
  <p>and a script that loads up a browser window with a certain url:</p>
  
  <pre><code>describe('Protractor Demo App', function() {
    it('should have a title', function() {
      browser.driver.get('https://github.com/');
  
     // Click around and do things here.
  
    });
  });
  </code></pre>
  
  <p>The purpose my scripts right now are not to black-box test an application that I'm developing, but instead to automate common browser tasks that I don't feel like doing. </p>
  
  <p>Currently, I'm running the protractor script through my local command shell like this:</p>
  
  <pre><code>protractor protractor.conf.js 
  </code></pre>
  
  <p>I'm wondering if it is possibly to run protractor from within another node.js script. My thinking is that I could have the Lambda function kick off a protractor job, possibly by using the browsers available from Browserstack or Sauce Labs, but I can't figure out how to run protractor from a Node.js script.</p>