title: Setting up Screenshot Reporter for Protractor
body: <p>Since I'm a newbie with automated tests and protractor, I'm having some trouble setting this up in my tests.</p>
  
  <p>According to the <a href="https://github.com/swissmanu/protractor-screenshot-reporter" rel="nofollow noreferrer">guide</a>, every time that I create a new instance of screenshot reporter, I have to pass a directory path. Right, this means that every time I create a new instance in my <strong>spec</strong> file?</p>
  
  <p>Also, there are functions to take screenshots of my skipped and my failed tests. Where i supposed to use      <code>takeScreenShotsForSkippedSpecs</code> and <code>takeScreenShotsOnlyForFailedSpecs</code>? In my config file? </p>
  
  <p>This is my onPrepare:</p>
  
  <pre><code>onPrepare: function () {
          browser.driver.manage().window().maximize();
          global.dvr = browser.driver;
          global.isAngularSite = function (flag) {
              browser.ignoreSynchronization = !flag;
          }
          jasmine.getEnv().addReporter(new ScreenShotReporter({
              baseDirectory: '/tmp/screenshots',
              takeScreenShotsForSkippedSpecs: true,
              takeScreenShotsOnlyForFailedSpecs: true
          }));
  </code></pre>