Galooshi / happo

Visual diffing in CI for user interfaces
504 stars 16 forks source link

Add headless Chrome target #201

Open lencioni opened 7 years ago

lencioni commented 7 years ago

Now that headless Chrome is a thing, it probably shouldn't be too difficult to add Chrome as a rendering target for Happo.

trotzig commented 7 years ago

Yep, the only thing different from the firefox target is that the chrome webdriver doesn't support taking a screenshot of a single element (at least not last time I checked). This is the relevant code for the happo-target-firefox package: https://github.com/Galooshi/happo/blob/c291f5fa9e729e49c8b1d2246a288da18ed51052/packages/happo-target-firefox/src/runVisualDiffs.js#L76

beeing commented 6 years ago

In case if you missed this, puppeteer will be a better option.

An example of screenshot in their test code.