tomeara / green_onion

UI testing/screenshot diffing tool
MIT License
2 stars 0 forks source link

Custom Drivers #2

Open bradgignac opened 11 years ago

bradgignac commented 11 years ago

Any thoughts on how to add custom drivers? I'd like to use Selenium's remote driver to run tests against our Selenium Grid, but it doesn't look possible with the current implementation. This might be a one-off thing that I can add support for in our app, but it also might be something very useful.

tomeara commented 11 years ago

GreenOnion was structured so that you could add in your own custom drivers, just as long as you initialize the driver you'd like to use, as well as creating a record method with url, path, and dimensions as arguments. You will also need to name the file whatever you'd like to include in the GreenOnion.configure block. Originally, I was thinking that someone might want to use WATIR or something other than Capybara.

The current Selenium driver might be the best place to look to follow the pattern: lib/green_onion/drivers/selenium.rb

If you do write your own driver, I think it would be great to include with the rest of the drivers we have currently.