Cypress web自动化14-window窗口属性

前言

在 Cypress 中引用窗口和窗口上其他属性的示例

cy.window()

要获取全局窗口对象,请使用cy.window()命令。

cy.window().should('have.property', 'top')

cy.document()

To get the document object, use the cy.document() command.
要获取document对象,请使用cy.document()命令。

cy.document().should('have.property', 'charset').and('eq', 'UTF-8')

cy.title()

要获取标题,请使用cy.title()命令。

cy.title().should('include', 'Kitchen Sink')
posted @ 2020-05-12 19:11  上海-悠悠  阅读(1247)  评论(0编辑  收藏  举报