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

angular

Event page | Meetup page

Promises

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(by.id(‘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
Advertisement

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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.