Skip to content

Commit 9db235c

Browse files
authored
🔖 release-v2.0.2 (#257)
* 🔖 release-v2.0.2 * Updating java syntax * Update Variables
1 parent bd30990 commit 9db235c

File tree

3 files changed

+42
-18
lines changed

3 files changed

+42
-18
lines changed

README.md

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -172,26 +172,50 @@ public class Example {
172172
- `driver` (**required**) - A selenium driver instance
173173
- `name` (**required**) - The screenshot name; must be unique to each screenshot
174174
- `options` (**optional**) - There are various options supported by percy.screenshot to server further functionality.
175-
- `freezeAnimation` - Boolean value by default it falls back to `false`, you can pass `true` and percy will freeze image based animations.
175+
- `freezeAnimatedImage` - Boolean value by default it falls back to `false`, you can pass `true` and percy will freeze image based animations.
176+
- `freezeImageBySelectors` - List of selectors. Images will be freezed which are passed using selectors. For this to work `freezeAnimatedImage` must be set to true.
177+
- `freezeImageByXpaths` - List of xpaths. Images will be freezed which are passed using xpaths. For this to work `freezeAnimatedImage` must be set to true.
176178
- `percyCSS` - Custom CSS to be added to DOM before the screenshot being taken. Note: This gets removed once the screenshot is taken.
177-
- `ignoreRegionXpaths` - elements in the DOM can be ignored using xpath
178-
- `ignoreRegionSelectors` - elements in the DOM can be ignored using selectors.
179-
- `ignoreRegionSeleniumElements` - elements can be ignored using selenium_elements.
180-
- `customIgnoreRegions` - elements can be ignored using custom boundaries
181-
- IgnoreRegion:-
182-
- Description: This class represents a rectangular area on a screen that needs to be ignored for visual diff.
183-
184-
- Constructor:
179+
- `ignoreRegionXpaths` - List of xpaths. elements in the DOM can be ignored using xpath
180+
- `ignoreRegionSelectors` - List of selectors. elements in the DOM can be ignored using selectors.
181+
- `ignoreRegionSeleniumElements` - List of selenium web-element. elements can be ignored using selenium_elements.
182+
- `customIgnoreRegions` - List of custom objects. elements can be ignored using custom boundaries
183+
- Refer to example -
184+
- ```
185+
List<HashMap> customRegion = new ArrayList<>();
186+
HashMap<String, Integer> region1 = new HashMap<>();
187+
region1.put("top", 10);
188+
region1.put("bottom", 110);
189+
region1.put("right", 10);
190+
region1.put("left", 120);
191+
customRegion.add(region1);
192+
options.put("custom_ignore_regions", customRegion);
185193
```
186-
init(self, top, bottom, left, right)
194+
- Parameters:
195+
- `top` (int): Top coordinate of the ignore region.
196+
- `bottom` (int): Bottom coordinate of the ignore region.
197+
- `left` (int): Left coordinate of the ignore region.
198+
- `right` (int): Right coordinate of the ignore region.
199+
- `considerRegionXpaths` - List of xpaths. elements in the DOM can be considered for diffing and will be ignored by Intelli Ignore using xpaths.
200+
- `considerRegionSelectors` - List of selectors. elements in the DOM can be considered for diffing and will be ignored by Intelli Ignore using selectors.
201+
- `considerRegionSeleniumElements` - List of selenium web-element. elements can be considered for diffing and will be ignored by Intelli Ignore using selenium_elements.
202+
- `customConsiderRegions` - List of custom objects. elements can be considered for diffing and will be ignored by Intelli Ignore using custom boundaries
203+
- Refer to example -
204+
- ```
205+
List<HashMap> customRegion = new ArrayList<>();
206+
HashMap<String, Integer> region2 = new HashMap<>();
207+
region2.put("top", 10);
208+
region2.put("bottom", 110);
209+
region2.put("right", 10);
210+
region2.put("left", 120);
211+
customRegion.add(region2);
212+
options.put("custom_consider_regions", customRegion);
187213
```
188214
- Parameters:
189-
`top` (int): Top coordinate of the ignore region.
190-
`bottom` (int): Bottom coordinate of the ignore region.
191-
`left` (int): Left coordinate of the ignore region.
192-
`right` (int): Right coordinate of the ignore region.
193-
- 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.
194-
- valid: Ignore region should be within the boundaries of the screen.
215+
- `top` (int): Top coordinate of the consider region.
216+
- `bottom` (int): Bottom coordinate of the consider region.
217+
- `left` (int): Left coordinate of the consider region.
218+
- `right` (int): Right coordinate of the consider region.
195219
196220
### Creating Percy on automate build
197221
Note: Automate Percy Token starts with `auto` keyword. The command can be triggered using `exec` keyword.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>io.percy</groupId>
77
<artifactId>percy-java-selenium</artifactId>
8-
<version>2.0.2-beta.1</version>
8+
<version>2.0.2</version>
99
<packaging>jar</packaging>
1010

1111
<name>${project.groupId}:${project.artifactId}</name>

src/main/java/io/percy/selenium/Environment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
class Environment {
1212
private WebDriver driver;
13-
private final static String SDK_VERSION = "2.0.2-beta.1";
13+
private final static String SDK_VERSION = "2.0.2";
1414
private final static String SDK_NAME = "percy-java-selenium";
1515

1616
Environment(WebDriver driver) {

0 commit comments

Comments
 (0)