PageFactory

Selenium PageObjects and PageFactory

只愿长相守 提交于 2019-12-06 14:07:17
PageObject Design Pattern The PageObject design pattern models areas of a UI as objects within test code. The functionality classes (PageObjects) in this design represent a logical relationship between the pages of the application. Each class is referred to as a PageObject and returns other PageObjects to facilitate the flow between pages. Because PageObjects are returned, it becomes necessary to model both successful and unsuccessful events that can occur when interacted with a page. For example, consider logging into Gmail. After entering the user details, the step either passes and