Canonical way to define page objects in Protractor

前端 未结 2 1591
我在风中等你
我在风中等你 2021-01-11 11:38

We\'ve been using the Page Object pattern for quite a while. It definitely helps to organize the end-to-end tests and makes tests more readable and clean.

As Using P

2条回答
  •  星月不相逢
    2021-01-11 12:01

    Alecxe, I had this same question. The answer for me came down to the ability to extend constructor-based page objects. For things I don't need to extend (with a basePage, for example), I use an object literal.

    This is just based on the things I've read and tried... I'd be happy to learn about a better/different pattern.

    I look forward to reading the style guide, Andres.

提交回复
热议问题