Skip to content

Commit 97399ee

Browse files
1.0.1 release (#100)
1 parent f56277b commit 97399ee

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

Percy/Percy.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<PackageId>PercyIO.Playwright</PackageId>
1212
<Description>Percy for Playwright Driver API .NET Bindings</Description>
1313
<PackageTags>playwright;percy;visual;testing</PackageTags>
14-
<Version>1.0.1-beta.0</Version>
14+
<Version>1.0.1</Version>
1515
<Company>BrowserStack</Company>
1616
<Copyright>Copyright BrowserStack</Copyright>
1717
<Authors>BrowserStack</Authors>

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class Program
172172
- `right` (int): Right coordinate of the consider region.
173173
- `regions` parameter that allows users to apply snapshot options to specific areas of the page. This parameter is an array where each object defines a custom region with configurations.
174174
- Parameters:
175-
- `elementSelector` (optional)
175+
- `elementSelector` (optional, only one of the following must be provided, if this is not provided then full page will be considered as region)
176176
- `boundingBox` (object): Defines the coordinates and size of the region.
177177
- `x` (number): X-coordinate of the region.
178178
- `y` (number): Y-coordinate of the region.
@@ -220,7 +220,26 @@ var region = new Percy.Region
220220
}
221221
};
222222

223-
Percy.Snapshot(page, "Homepage", regions: new List<Region> { region });
223+
// or we can use CreateRegion function
224+
225+
var diffSensitivity = 3;
226+
var carouselsEnabled = true;
227+
var algorithm = "intelliignore";
228+
var diffIgnoreThreshold = 0.5;
229+
230+
var region = Percy.CreateRegion(
231+
algorithm: algorithm,
232+
diffSensitivity: diffSensitivity,
233+
carouselsEnabled: carouselsEnabled,
234+
diffIgnoreThreshold: diffIgnoreThreshold
235+
);
236+
237+
var options = new Dictionary<string, object>
238+
{
239+
{"regions", new List<Percy.Region> { region }},
240+
};
241+
242+
Percy.Snapshot(page, "snapshot_2", options);
224243

225244
```
226245

0 commit comments

Comments
 (0)