title: Testing a confirm dialog with Protractor
body: <p>This seems to be a pretty simple question, but I really can't find an answer online and I was not able to find an answer myself.</p>
  
  <p>I'm using AngularJS for my application and at some point, I have a native JavaScript confirmation box/dialog which asks the user if he/she wants to accept or cancel a change.</p>
  
  <p>How can I simulate the selected option in my tests (with Protractor)? Is it possible to access the confirmation box and "click" either Ok or Cancel and act accordingly in my test? I'm guessing something like</p>
  
  <pre><code>ptor.switchTo().&lt;something&gt;
  </code></pre>
  
  <p>would be possible, but I can't seem to find an answer.</p>