I am working on Ruby On Rails integration test using capybara, Selenium.
How to set testing Browser Window Height and Width?
I searched, but nothing work well for me.
I tried following code.
page.execute_script('$(window).width(1200)')
Can any one. please.
You can use the
resize_to(width, height)method that is part of the selenium webdriver.For example, the following would make the browser 100px wide and 200px tall: