Setting the size of Browser Window + Selenium and Capybara
window = Capybara.current_session.driver.browser.manage.window window.resize_to(1200, 800)
You can add this inside setup block.
class CapybaraIntegrationTest < ActionDispatch::IntegrationTest
# Make the Capybara DSL available in all integration tests
include Capybara::DSL
setup do
window = Capybara.current_session.driver.browser.manage.window
window.resize_to(1250, 800)
end
end
Comments
Post a Comment