What is the Page Object Pattern in Selenium WebDri

2019-01-12 21:46发布

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.

2条回答
仙女界的扛把子
2楼-- · 2019-01-12 22:20

[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".

查看更多
一夜七次
3楼-- · 2019-01-12 22:22

The documentation has already covered this. If you have any specific questions, feel free to edit your main post.

Official:

Unofficial: Do a Google search, you will get a lot info on this.

查看更多
登录 后发表回答