问题描述
Selenium Webdriver中的页面对象模式是什么?
它的用途是什么?我们如何在Selenium Webdriver中使用它?
将不胜感激.
推荐答案
文档已经涵盖了这一点.如果您有任何特定问题,请随时编辑您的主要帖子.
官方:
- page对象和 pagefactory 在selenuim wiki上.
- page Object oppect ofpect .
非官方: 进行Google搜索,您将获得很多有关此信息的信息.
- 页面对象模式
- selenium 2.0中的页面对象
- selenium 2/webernium 2/weberdriver快速提示:页面对象导航策略
- pageObject Martin Fowler
其他推荐答案
[编辑以回复以下答复.谢谢,我会做的更好.]
页面对象模式的目的是将测试接口完全封装到网页上.这遵循数据隐藏的时间悠久的实践.
这是我的帖子"保持页面对象干" .
问题描述
What is page object pattern in Selenium WebDriver?
What is the use of it and how can we use this in Selenium WebDriver?
Example will be appreciated.
推荐答案
The documentation has already covered this. If you have any specific questions, feel free to edit your main post.
Official:
- Page Objects and PageFactory on Selenuim Wiki.
- Page Object Design Pattern on Selenium official site.
Unofficial: Do a Google search, you will get a lot info on this.
- Page Object Pattern
- Page Objects in Selenium 2.0
- Selenium 2/WebDriver Quick Tips: Page Object Navigation Strategies
- PageObject by Martin Fowler
其他推荐答案
[Edited to respond to the reply below. And thanks, I'll do better.]
The purpose of the page object pattern is to completely encapsulate the testing interface to the web page. This follows the time-honored practice of data hiding.
Here's the Selenium article about the page object.
And here's my post "Keep Your Page Objects DRY".