Testing With Protractor Page Objects

Share this video with your friends

Send Tweet

Protractor Page Objects are a recommended for testing your AngularJS applications. Page Objects abstract the interaction between the browser and your functional tests, resulting in much cleaner tests.

Rob
Rob
~ 10 years ago

How does element(by.id('button1')) work as it gets called before the browser gets to the page with the button on it. Will protractor just lazily find the element when click() is called?

Bulkan
Bulkan
~ 9 years ago

In my tests I'm finding that the locator is resolved on page object instantiation causing a few test failures. I've used Object.defineProperty to provide some lazy evaluated locators

Victor Hazbun
Victor Hazbun
~ 8 years ago

is the IndexPage.js file under e2e/index folder, correct?