I am using Selenium Remote Control . During executing the tests the actual Firefox window is so small. I want it full screen so I can see what is happening. How can I maximize the browser screen?
You need to use resize method to minimize the browser. void setSize() – This method is used to set the size of the current browser. Dimension getSize() – This method is used to get the size of the browser in height and width.
Use the maximize() method from WebDriver. Maximizing the Chrome Window.
Using Selenium WebDriver we could Resize Browser Window size. It allows resizing and maximizing window natively from its API. To resize browser window to particular dimensions, we use 'Dimension' class to resize the 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 .
Try the windowMaximize command:
selenium.windowMaximize();
You can also set a specific width and height using the following command:
selenium.getEval("window.resizeTo(X, Y); window.moveTo(0,0);")
Where X is the width and Y is the height.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With