Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Split webdrivercss into multiple packages #113

Open
elicwhite opened this issue Sep 3, 2015 · 5 comments
Open

Split webdrivercss into multiple packages #113

elicwhite opened this issue Sep 3, 2015 · 5 comments

Comments

@elicwhite
Copy link
Contributor

Webdrivercss currently does a lot of different things. It takes screenshots, calculates diffs, uploads to aplitools / api, has testing helpers for images within tolerances etc.

I believe these are all distinct functions that people might want to swap with other options and should be packages layered on top of webdrivercss.

Here is my proposal:

  • Webdrivercss becomes just a plugin to webdriverio that captures and saves screenshots.
  • A new package that compares the two images locally, creates a diff, and outputs a result object like we currently get as the result in the callback to webdrivercss.
  • A package that can tar up a folder and upload it to aplitools / the webdrivercss-adminpanel

By splitting this up into multiple packages people can replace or swap the functionality that they want.

For example, I want to take screenshots, but I don't want to generate any diffs locally and I need to upload to a different server with different endpoints than webdrivercss-adminpanel. I've had to clear the image folder every time so that webdrivercss doesn't try to generate any diffs and write my own upload at the end.

@amitaibu
Copy link
Contributor

amitaibu commented Sep 4, 2015

I'm very in favor of splitting this. I haven't thought about the assertion package, but it's probably a good idea.

@klamping
Copy link
Contributor

WebdriverIO has a screenshot command that could be improved to allow selectors to be passed in: http://webdriver.io/api/utility/saveScreenshot.html

@christian-bromann
Copy link
Contributor

@klamping it's a good idea but it would require additional requirements (gm). We could enhance webdrivercss to provide a new command for the client instance.

@georgecrawford
Copy link

👍 to the general idea of splitting the repo into separate packages. I only want to use a few of the functions the complete package provides.

@georgecrawford
Copy link

@christian-bromann Could you add your thoughts regarding splitting webdrivercss into separate modules? Especially with regard to interoperability with webdriverio v4.0?

I'm very interested in this project, but wouldn't want all the functionality it provides. We're currently using Wraith, but we're very limited by not being able to run real interactions with the page before taking screenshots.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants