E2E for Beginner
- Command to run e2e - ng e2e
- Command to run the angular app - ng serve
Page Objects of E2E
Elements capturing needs to move into page objects. So page objects suppose to identify components of a page. And then e2e needs to do the action, verification and so on
Elements of Page Object
- use element finder as a constructor
- Create a class
- Create functions inside the class
Ex: private readonly matListItemSelector = '.list-item';
- Add function
Element Identification
async getHeading(): Promise<string> {
return this.elementFinder.element(by.css('h1')).getText();
}
async functions :
Even though these functions are failed the script is executed next steps
use the correct return type
Use an array to pass the values. Then using an index select the required value
Add scope of each page object
until load web elements
Search by adding values and select one option from the list
- Verify the value of a list
This comment has been removed by the author.
ReplyDelete