Skip to content

Instantly share code, notes, and snippets.

@shuhei
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shuhei/4c1157fea7c1d03e6017 to your computer and use it in GitHub Desktop.
Save shuhei/4c1157fea7c1d03e6017 to your computer and use it in GitHub Desktop.
How protoractor works
  • The methods like element(), element.all() and element().fisrt() return element finders instead of elements. At this time, element finding is not performed yet. So the element finders are reusable even when the page state changes.
  • The action methods like element().click(), element().getText() and element.count() return promises. At this time, element finding and action are not performed yet. They register actions to a queue in order.
  • The actions in the queue are executed one by one. When executed, element finding and the action are performed. Between actions, protractor waits for Angular to finish $digest loop and $http requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment