Skip to content

Commit c340af2

Browse files
readme
1 parent edac795 commit c340af2

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,22 @@ obj1 = {
161161
"diffIgnoreThreshold": 0.4,
162162
}
163163
};
164-
percy_snapshot(page, name="Homepage", regions: [obj1]);
164+
165+
# we can use the createRegion function
166+
167+
from percy import percy_snapshot
168+
from percy.screenshot import (create_region)
169+
170+
obj2 = create_region(
171+
algorithm="intellignore",
172+
diffSensitivity=2,
173+
imageIgnoreThreshold=0.2,
174+
carouselsEnabled=True,
175+
adsEnabled=True,
176+
diffIgnoreThreshold=0.4
177+
)
178+
179+
percy_snapshot(page, name="Homepage", regions=[obj1]);
165180
```
166181

167182

0 commit comments

Comments
 (0)