1

I want to maximize the browser window when online exam starts. After completing the exam the browser automatically go back to its previous state. Is it possible using Javascript?

Brian Tompsett - 汤莱恩
  • 5,438
  • 68
  • 55
  • 126
  • Do you mean full-screen instead of maximize? That is possible. But the browsers will not allow you to hijack users and prevent them from exiting it. – Ivar Jul 23 '18 at 14:46
  • i want fullscreen so that the browser doesn't show the taskbar menu or tab menu – Ariful Islam Jul 23 '18 at 15:15
  • See the linked question (answer with the most up votes, not the accepted answer). But like I said, it's impossible to prevent the user from exiting it. – Ivar Jul 23 '18 at 15:17

1 Answers1

-1
let driver = await new Builder().forBrowser(browser).build();
await driver.manage().window().maximize();
slfan
  • 8,665
  • 115
  • 63
  • 77