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.
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
fullscreen() 与 selenium 的 Window 类有关,并且尊重 maximize()= 它将以最小化,关闭..按钮全屏显示 FullScreen() = 它不会以最小化,关闭..buttons 显示全屏,有单击 esc 以获取浏览器按钮
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.