Skip to content

Instantly share code, notes, and snippets.

@evan-007
Last active August 29, 2015 14:03
Show Gist options
  • Save evan-007/c8de5bc45fe86e2fd898 to your computer and use it in GitHub Desktop.
Save evan-007/c8de5bc45fe86e2fd898 to your computer and use it in GitHub Desktop.
Protractor matchers/commands
Matchers are same as selenium webdriver matchers!
//url matcher
expect(brower.getCurrentUrl()).toMatch(/\/yourmom/);
//by ng-model
//match input form value
locationInput = element(by.model('signup.location'));
expect(locationInput.getAttribute("value")).toMatch(/boston/);
//byCss
element(by.css('h1 .someclass'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment