1、官方文档

https://docs.cypress.io/api/commands/screenshot.html#Syntax

2、用法

cypress-screenshot

3、options详解

cypress-screenshot

4、实例


cy.screenshot();

页面有多长,截取多长,因为默认capture值为fullPage


cy.screenshot("my-test");

截取全图,文件名称自定义为"my-test"


cy.screenshot({

capture: 'viewport'

});

截取图片大小为被侧程序的当前视窗大小,也是当前展示的图

 

相关文章:

  • 2022-01-28
  • 2021-10-28
  • 2022-12-23
  • 2022-12-23
  • 2021-04-06
  • 2021-10-14
  • 2021-09-21
  • 2021-04-15
猜你喜欢
  • 2021-09-08
  • 2022-12-23
  • 2021-07-04
  • 2021-09-12
  • 2021-12-10
  • 2022-12-23
  • 2021-08-27
相关资源
相似解决方案