Skip to content

Instantly share code, notes, and snippets.

@jbpros
Last active August 29, 2015 14:25
Show Gist options
  • Save jbpros/46797fdc931746c38bc4 to your computer and use it in GitHub Desktop.
Save jbpros/46797fdc931746c38bc4 to your computer and use it in GitHub Desktop.
ENV['RACK_ENV'] = 'test'
require 'shouty'
require 'capybara'
require 'selenium-webdriver'
Capybara.register_driver :selenium do |app|
profile = Selenium::WebDriver::Firefox::Profile.new
driver = Capybara::Selenium::Driver.new(app, :browser => :firefox, :profile => profile)
w = 1274
h = 714
x = 322
y = -898
d = 2
driver.browser.manage.window.resize_to(w / 2, h)
driver.browser.manage.window.move_to(322 + (w/2), -898)
sleep 2
driver
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment