Protractor find element in context (Snippet)

var myForm = element(by.css('form')); var myInput = myForm.element(by.css('input')); ...

March 16, 2017 · 1 min · Markus Ruepp

Testing using protractor, lessons learned

A failing test should tell you what is wrong and not the area. Abstract everything by using components. We reuse the component architecture of the webapp in the unit test and protractor tests. E.g. two pages with the same datpicker component will also use only only one datepicker protractor component. protractor only returns promises This is annoying for debugging use beforeAll to speed up tests. If possible try to use beforeAll instead of beforeEach....

February 22, 2017 · 1 min · Markus Ruepp