Page Objects笔记
目录
- 六大原则
六大原则
- The public methods represent the services that the page offers
公共方法表示页面提供的服务
- Try not to expose the internals of the page
不要暴露页面的细节
- Generally don’t make assertions
Page设计中不要出现断言,应该写在测试用例类中
- Methods return other PageObjects
方法应该返回其他的Page对象
- Need not represent an entire page
不要去代表整个page,如果一个页面中有很多功能,只需要对重点功能封装方法即可
- Different results for the same action are modeled as different methods
不同的结果返回不同的方法,不同的模式
Abilish
China, Heilongjiang