4 ms·
Nice rundown, wish I had read this a year ago! > One developer designed a way to take a screenshot of our main drawing canvas and store it in Amazon’s S3 servi
by bcjordan 11y ago
Nice rundown, wish I had read this a year ago!
> One developer designed a way to take a screenshot of our main drawing canvas and store it in Amazon’s S3 service. This was then integrated with a screenshot comparison tool to do image comparison tests.
I would also take a look at Applitools https://applitools.com/ https://applitools.com/ — they have Selenium webdriver-compatible libraries that do this screenshot taking/upload and offer a nice interface for comparing screenshot differences (and for adding ignore areas). Way fewer false failures than typical pdiff/imagemagick comparisons.
- drothlis 11y agoIf using Selenium's Python bindings, you can take a screenshot from Selenium and convert it to OpenCV format like this: cv2.imdecode( numpy.asarray( bytearray(base64.decodestring(driver.get_screenshot_as_base64())), dtype=numpy.uint8), cv2.CV_LOAD_IMAGE_UNCHANGED) (where `driver` is your WebDriver object, e.g. `WebDriver.Chrome()`). Then to match that frame against a previously-captured "template" image, you can use stb-tester's[1] "match" function[2] which allows you to specify things like the region to ignore and tweak the matching sensitivity. [1] http://stb-tester.com http://stb-tester.com [2] http://stb-tester.com/stb-tester-one/rev2015.1/python-api#stbt.match http://stb-tester.com/stb-tester-one/rev2015.1/python-api#st...