You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,21 @@
1
1
# VisualCeption
2
2
Visual regression tests integrated in [Codeception](http://codeception.com/).
3
3
4
+
This moculde can be used to compare screenshots of a website element.
5
+
6
+
## How it works
7
+
8
+
VisualCeption uses a combination of the "make a screenshot" feature in webdriver, imagick and jquery to compare visual elements on a website. This comparison is done in four steps:
9
+
10
+
1.**Take a screenshot** of the full page using webdriver.
11
+
2.**Calculate the position** and size of the selected element using jquery.
12
+
3.**Crop the element** out of the full screenshot using imagick.
13
+
4.**Compare the element** with an older version of the screenshot that has been proofed as valid using imagick. If no previous image exists the current image will be used fur future comparions. As an effect of this approach the test has to be **run twice** before it works.
14
+
5. If the deviation is too high **throw an exception** that is caught by Codeception.
0 commit comments