How to set the size of browser window using selenium?



How to set the size of browser window using selenium?..

Answer / Kumar Mukesh

To set the size of the browser window using Selenium, you can use the Manage() class's window().setSize() method. Here is an example:

driver.manage().window().setSize(new Dimension(1024, 768));

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Selenium Interview Questions

How does click on button without using click method

2 Answers  


How will you find an element using selenium?

1 Answers  


What is the difference between @factory and @data provider annotation?

1 Answers  


Is webelement an interface or a class?

1 Answers  


How can we find the value of different attributes like name, class, the value of an element?

1 Answers  


How to perform right click using selenium webdriver?

1 Answers  


What is the difference between selenium and qtp?

1 Answers  


What are the different ways of locating a web element in selenium?

1 Answers  


How to check if a text is highlighted on the page ?

1 Answers  


Explain how to iterate through options in test script?

1 Answers  


When to use assert, verify and waitfor in selenium?

1 Answers  


What kinds of tests can be run with the selenium framework?

1 Answers  


Categories