Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Maximize a firefox browser window using Selenium WebDriver with node.js

How do we maximize a firefox browser using Selenium WebDriver (Selenium 2) with node.js. I am using wd package for Selenium WebDriver to write the tests. I have tried executing window.resizeTo(1366,768); usin eval or execute but didn't work.

I am using Selenium WebDriver 2.25.0

like image 911
testerteaser Avatar asked Dec 27 '12 09:12

testerteaser


People also ask

How can you set the browser window to fullscreen in Selenium?

To maximize browser in Selenium, you need to call the maximize() Selenium command to maximize window interface of the driver class. void maximize() – This method is used to maximize the current browser.

What is the Selenium command to maximize the browser window?

1. Use the maximize() method from WebDriver. Window Interface.

How do I maximize my browser window?

To maximize a window, grab the titlebar and drag it to the top of the screen, or just double-click the titlebar. To maximize a window using the keyboard, hold down the Super key and press ↑ , or press Alt + F10 .


1 Answers

Have you tried :

driver.manage().window().maximize()  

Doc

like image 133
niharika_neo Avatar answered Sep 18 '22 09:09

niharika_neo