Promises and E2E Testing with Protractor – AngularJS Melbourne – 5th August 2014


Event page | Meetup page


End to End (E2E) testing of JavaScript with JavaScript (Protractor JS)

  • Braiden Judd @pragmaticyclist
  • Slides
  • ProtractorJS Github
  • Similar syntax to Selenium
  • Navigate:
    • browser.get(‘/#/blogs’)
    • browser.refresh()
  • Selecting:
    • element() : single element / first element
    • element.all() : returns an array
    • Examples
      • browser.driver.findElement(‘ok’)).click();
      • browser.driver.findElement(by.binding(‘blog.title’)).getText();
      • browser.driver.findElement(by.model(‘password’)).sendKeys(‘password’);
      • browser.driver.findElement.all(by.repeater(‘blog in blogs’)).get(0).getText();
  • Events
    • click() : click the element (e.g. button)
    • sendKeys() : type into a text box

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.