Reputation: 1463
I need to resize my browser windown in order for my tests to run correctly or I get an error stating that element cannot be inteacted with, other element would receive the click.
So I attempt to resize the browser window. My code looks like this:
Capybara.register_driver :selenium do |app|
Capybara::Selenium::Driver.new(app, :browser => :chrome)
page.driver.browser.manage.window.resize_to(1800, 1800)
However I get a stack level too deep error. I am pretty sure I am using the window.resize_to method correctly. I have also tried using this method:
def set_selenium_window_size(width, height)
window = Capybara.current_session.driver.browser.manage.window
window.resize_to(width, height)
end
and then caling the method after I register the driver but again I get the stack level too deep error.
Has anyone else seen this and how did you get around it?
Upvotes: 0
Views: 305