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')


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM