@applitools/eyes.cypress
Advanced tools
Comparing version 3.3.13 to 3.3.14
{ | ||
"name": "@applitools/eyes.cypress", | ||
"version": "3.3.13", | ||
"version": "3.3.14", | ||
"main": "index.js", | ||
@@ -39,3 +39,3 @@ "license": "MIT", | ||
"@applitools/functional-commons": "^1.0.27", | ||
"@applitools/visual-grid-client": "^9.0.2", | ||
"@applitools/visual-grid-client": "^9.0.3", | ||
"body-parser": "^1.18.3", | ||
@@ -42,0 +42,0 @@ "chalk": "^2.4.1", |
@@ -175,10 +175,29 @@ # Eyes.Cypress | ||
- **`viewport`**: Only a screenshot the size of the browser will be rendered (the size of the browser can be set in the call to `cy.eyesOpen` - see advanced configuration below). | ||
- **`selector`**: Take a screenshot of the content of the element targeted by the css selector. It's necessary to specify the value of the selector in the `selector` argument. | ||
- **`selector`**: Take a screenshot of the content of the element targeted by css or xpath selector. It's necessary to specify the value of the selector in the `selector` argument. | ||
- **`region`**: Take a screenshot of a region of the page, specified by coordinates. It's necessary to specify the value of the region in the `region` argument. | ||
- `selector` (optional): In case `sizeMode` is `selector`, this should be the actual css selector to an element, and the screenshot would be the content of that element. For example: | ||
- `selector` (optional): In case `sizeMode` is `selector`, this should be the actual css or xpath selector to an element, and the screenshot would be the content of that element. For example: | ||
```js | ||
// Using a css selector | ||
cy.eyesCheckWindow({ | ||
sizeMode: 'selector', | ||
selector: { | ||
type: 'css', | ||
selector: '.my-element' // or '//button' | ||
} | ||
}); | ||
// Using an xpath selector | ||
cy.eyesCheckWindow({ | ||
sizeMode: 'selector', | ||
selector: { | ||
type: 'xpath', | ||
selector: '//button[1]' | ||
} | ||
}); | ||
// The shorthand string version defaults to css selectors | ||
cy.eyesCheckWindow({ | ||
sizeMode: 'selector', | ||
selector: '.my-element' | ||
@@ -185,0 +204,0 @@ }); |
Sorry, the diff of this file is too big to display
129107
435