0 votes
1 view
in DevOps and Agile by (19.8k points)

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 worked well for me.

I tried the following code.


Can anyone help with this?

1 Answer

0 votes
by (63.4k points)

You can use the resize_to(width, height) method which is an in-built method of selenium webdriver class.

For example, the below code snippet would resize the browser with 100px wide and 200px tall dimensions:


Welcome to Intellipaat Community. Get your technical queries answered by top developers !