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?
Asked
Active
Viewed 1,020 times
1
-
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 Answers
-2
let driver = await new Builder().forBrowser(browser).build();
await driver.manage().window().maximize();

slfan
- 8,950
- 115
- 65
- 78

Christopher J. Scharer
- 27
- 1
- 3