blob: 14ea06459de73dc925f98e0948da36080aa1d7c1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
require "action_dispatch/system_testing/driver"
module ActionDispatch
module SystemTesting
class Browser < Driver # :nodoc:
def initialize(name, screen_size)
super(name)
@name = name
@screen_size = screen_size
end
def use
register
super
end
private
def register
Capybara.register_driver @name do |app|
Capybara::Selenium::Driver.new(app, browser: @name).tap do |driver|
driver.browser.manage.window.size = Selenium::WebDriver::Dimension.new(*@screen_size)
end
end
end
end
end
end
|