如果想从头学起Cypress,可以看下面的系列文章哦

https://www.cnblogs.com/poloyy/category/1768839.html

 

作用

获取当前页面的 window.document 

 

语法格式

cy.document()
cy.document(options)

options:只有 timeout 和 log,不再展开讲了

 

正确写法

cy.document()

 

实际栗子

测试文件代码

Cypress系列(36)- document() 命令详解

 

测试结果

Cypress系列(36)- document() 命令详解

 

document() 命令的产物

Cypress系列(36)- document() 命令详解

 

结尾

我的博客即将同步至腾讯云+社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=12vd92hxgwgj1

相关文章:

  • 2021-09-13
  • 2021-11-27
  • 2021-07-08
  • 2021-11-03
  • 2022-02-14
  • 2021-11-12
  • 2021-10-14
  • 2021-07-20
猜你喜欢
  • 2021-10-17
  • 2021-04-28
  • 2021-04-14
  • 2021-08-28
  • 2021-06-09
  • 2021-06-07
  • 2021-08-04
相关资源
相似解决方案