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