For other screenshots, the first argument is the document. When capturing screenshots of an element, the first argument is the element being captured. For other screenshots, the argument is the document.Ī callback after a non-failure screenshot is taken. When capturing screenshots of an element, the argument is the element being captured. Whether to overwrite duplicate screenshot files with the same file name when saving.Ī callback before a non-failure screenshot is taken. screenshot() to resolve before timing out This is always coerced to true when capture is runner. Whether to scale the app to fit into the browser viewport. This property is only applied for element screenshots and is ignored for all other types. It can either be a number, or an array of up to four numbers using CSS shorthand notation. Padding used to alter the dimensions of a screenshot of an element. When true, prevents JavaScript timers ( setTimeout, setInterval, etc) and CSS animations from running while the screenshot is taken. Position and dimensions (in pixels) used to crop the final screenshot image. For screenshots automatically taken on test failure, capture is always coerced to runner. When runner, the entire browser viewport, including the Cypress Command Log, is captured. When fullPage, the application under test is captured in its entirety from top to bottom. When viewport, the application under test is captured in the current viewport. Valid values are viewport, fullPage, or runner. This value is ignored for element screenshot captures. Which parts of the Cypress Test Runner to capture. OptionĪrray of string selectors used to match elements that should be blacked out when the screenshot is taken. Pass in an options object to change the default behavior of. When passed a path, the folder structure will be created.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |