Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔖 release-v2.0.1 #403

Merged
merged 5 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 24 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,27 +142,31 @@ const driver = new webdriver.Builder().usingServer('https://hub-cloud.browsersta
- `driver` (**required**) - A Selenium driver instance
- `name` (**required**) - The screenshot name; must be unique to each screenshot
- `options` (**optional**) - There are various options supported by percyScreenshot to server further functionality.
- `freezeAnimation` - Boolean value by default it falls back to `false`, you can pass `true` and percy will freeze image based animations.
- `freezeAnimatedImage` - Boolean value by default it falls back to `false`, you can pass `true` and percy will freeze image based animations.
Amit3200 marked this conversation as resolved.
Show resolved Hide resolved
- `freezeImageBySelectors` - List of selectors. Images will be freezed which are passed using selectors. For this to work `freezeAnimatedImage` must be set to true.
- `freezeImageByXpaths` - List of xpaths. Images will be freezed which are passed using xpaths. For this to work `freezeAnimatedImage` must be set to true.
- `percyCSS` - Custom CSS to be added to DOM before the screenshot being taken. Note: This gets removed once the screenshot is taken.
- `ignoreRegionXpaths` - elements in the DOM can be ignored using xpath
- `ignoreRegionSelectors` - elements in the DOM can be ignored using selectors.
- `ignoreRegionSeleniumElements` - elements can be ignored using selenium_elements.
- `customIgnoreRegions` - elements can be ignored using custom boundaries
- IgnoreRegion:-
- Description: This class represents a rectangular area on a screen that needs to be ignored for visual diff.

- Constructor:
```
init(self, top, bottom, left, right)
```
- Parameters:
`top` (int): Top coordinate of the ignore region.
`bottom` (int): Bottom coordinate of the ignore region.
`left` (int): Left coordinate of the ignore region.
`right` (int): Right coordinate of the ignore region.
- Raises:ValueError: If top, bottom, left, or right is less than 0 or top is greater than or equal to bottom or left is greater than or equal to right.
- valid: Ignore region should be within the boundaries of the screen.

- `ignoreRegionXpaths` - List of xpaths. elements in the DOM can be ignored using xpath
- `ignoreRegionSelectors` - List of selectors. elements in the DOM can be ignored using selectors.
- `ignoreRegionSeleniumElements` - List of selenium web-element. elements can be ignored using selenium_elements.
- `customIgnoreRegions` - List of custom objects. elements can be ignored using custom boundaries. Just passing a simple object for it like below.
- example: ```{top: 10, right: 10, bottom: 120, left: 10}```
- In above example it will draw rectangle of ignore region as per given coordinates.
- `top` (int): Top coordinate of the ignore region.
- `bottom` (int): Bottom coordinate of the ignore region.
- `left` (int): Left coordinate of the ignore region.
- `right` (int): Right coordinate of the ignore region.
- `considerRegionXpaths` - List of xpaths. elements in the DOM can be considered for diffing and will be ignored by Intelli Ignore using xpaths.
- `considerRegionSelectors` - List of selectors. elements in the DOM can be considered for diffing and will be ignored by Intelli Ignore using selectors.
- `considerRegionSeleniumElements` - List of selenium web-element. elements can be considered for diffing and will be ignored by Intelli Ignore using selenium_elements.
- `customConsiderRegions` - List of custom objects. elements can be considered for diffing and will be ignored by Intelli Ignore using custom boundaries
- example: ```{top: 10, right: 10, bottom: 120, left: 10}```
- In above example it will draw rectangle of consider region will be drawn.
- Parameters:
- `top` (int): Top coordinate of the consider region.
- `bottom` (int): Bottom coordinate of the consider region.
- `left` (int): Left coordinate of the consider region.
- `right` (int): Right coordinate of the consider region.
### Creating Percy on automate build
Note: Automate Percy Token starts with `auto` keyword. The command can be triggered using `exec` keyword.
```sh-session
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@percy/selenium-webdriver",
"description": "Selenium client library for visual testing with Percy",
"version": "2.0.1-beta.1",
"version": "2.0.1",
"license": "MIT",
"author": "Perceptual Inc.",
"repository": "https://github.com/percy/percy-selenium-js",
Expand All @@ -12,7 +12,7 @@
],
"publishConfig": {
"access": "public",
"tag": "beta"
"tag": "latest"
},
"main": "index.js",
"types": "types/index.d.ts",
Expand Down
Loading