I just happened to notice that there is a fullscreen()
method, which I had not noticed earlier, that is available with the interface WebDriver.Window
.
As per the Selenium javadocs:
-> fullscreen()
- Fullscreen the current window if it is not already fullscreen
-> maximize()
- Maximizes the current window if it is not already maximized
I don't understand any difference in the explanations here. Both of them say the same thing.
When I tried to use driver.manage().window().fullscreen();
, I got this error
org.openqa.selenium.UnsupportedCommandException: unknown command: session/b368564bbe1863857d7ce10cc5f38e38/window/fullscreen
Can someone help me understand the usage/difference of these 2 commands.
I am using Java 8 + Selenium 3.0.1 + Intellij 15 + Chrome 54.
driver.manage().window().fullscreen();
driver.manage().window().maximize();
On HP systems, on pressing F11, the screen goes in the fullscreen mode, and you will not be able to see the address bar, all you will see is the content of the page. Now this control varies from system to system, so you need to implement this command. And in the method you create, specify the key action that does this for your system. On the other hand, the maximize()
maximizes the size of the browser window.
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