6

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.

1
  • 7
    They don't say the same thing. A maximized window is not the same as a fullscreen window. When maximized, the title bar etc. of the window is still displayed. In fullscreen mode, the title bar is not displayed. Try pressing F11 when you use Chrome, that shows you what fullscreen mode looks like.
    – Jesper
    Commented Nov 22, 2016 at 11:59

4 Answers 4

4

driver.manage().window().fullscreen();

  • The browser's menu bar is not visible
  • The whole desktop estate is covered up by the browser.
  • The Task bar is not visible

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

  • The browser's menu bar is visible
  • The whole desktop estate is not covered up by the browser.
  • The Task bar is visible
1

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.

0

It is a known issue. you can find the issue details here. observed in almost all environments and the issue is still in Open state.

I also got the same error when used fullscreen() in the following environment:

Windows 7  - 64
Selenium 3.0.1
Chrome 54.0.9
Java 8
0

fullscreen() is related to Window class of selenium ,and the deference for maximize()= it will display full screen with minimize,close..buttons FullScreen() =it will not display full screen with minimize,close..buttons , have to click esc to get browser buttons

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.