0

Is there any elegant(or not) solution to open a browser in full screen mode from command line.

Browser full screen api will works only on any user action.

I just need to display a data in a big monitor without showing title bar, menu bar etc. Whether it is possible with browser without any user action.

Whether I could trigger any user action using selenium like tools.

Or anybody could tell any other alternatives to display a data in full screen mode without any user action, but with command line.

Thanks in advance.

Milano
  • 18,048
  • 37
  • 153
  • 353
Sony George
  • 558
  • 2
  • 8
  • 16
  • possible duplicate of: http://stackoverflow.com/questions/19355370/how-to-open-a-web-page-automatically-in-full-screen-mode – Doml The-Bread Apr 22 '15 at 09:38

3 Answers3

1

This will switch the browser to fullscreen:

getDriver().switchTo().activeElement().sendKeys(Keys.F11);
Cathal
  • 1,318
  • 1
  • 12
  • 19
  • Yeah.. it works with selenium, python and firefox webdriver. code is little different when using python but the philosophy is same. – Sony George Apr 22 '15 at 13:26
1

Depending on browser. If it's Chrome, just add a needed parameter to executable:

google-chrome --kiosk http://example.com
Stan E
  • 3,396
  • 20
  • 31
0

The WebDriver.Window interface has the maximize() method for setting the size of a browser window to full screen.

Example usage:

driver = new InternetExplorerDriver();
driver.manage().window().maximize();

http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/WebDriver.Window.html

Tom Trumper
  • 472
  • 2
  • 8