● Make a habit to use element.all(by...).
count() to be sure that you create most
suitable element selector.
● Expect false errors. To confirm an error,
run the tests under alternative OS
● Beware of the async nature of
● If something doesn't work as expected
go Protractor native, i.e. using .then()
● Don't abstract the code directly to the
PageObject. Often this abstraction lead
● Other possible issue is when the
element is not in the visible part of the
● Avoid use of browser.sleep() right after
● If you stumble on an error, that the
element you are clicking on is not
attached to the document, that means
that this is not a testable scenario
● Once you set the browser size, it persist
in your tests until the next browser.
● Popups and animation can temporary
● The behaviour of .then() method of
Protractor’s .map(), .each(), .filter() can
● One falsy selection can ruin all the tests.
Protractor is hard to debug mainly
because in such occasions
● To make scroll down work, first you
need to focus the to the "window" by
clicking on any element within the
● Make all your clicks statement either
inside the tests, or in the PageObject.
Walk the extra mile
Most of slides of this
presentation are based on: