[英]TestCafe: Implement Page Object Model
I am trying to implement the Page Object Model in my TestCafe project.我正在尝试在我的 TestCafe 项目中实现页面对象模型。 How do I implement page transitions from one page to another?
如何实现从一页到另一页的页面转换? For eg Move from Login page object to obtain Home page object, both pages have different properties/fields.
例如,从登录页面对象移动到主页对象,两个页面都有不同的属性/字段。 In Selenium there is a PageFactory and webdriver to work with, how should I implement it in TestCafe?
在 Selenium 中有一个 PageFactory 和 webdriver 可以使用,我应该如何在 TestCafe 中实现它?
You don't need to worry about page transitions.您无需担心页面转换。 TestCafe's Selectors are lazy by default.
默认情况下,TestCafe 的选择器是惰性的。 Just declare the necessary Page Objects in the fixture file and use it.
只需在夹具文件中声明必要的页面对象并使用它。 See the detailed example in the Use Page Model help topic.
请参阅使用页面模型帮助主题中的详细示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.