Reputation: 641
How can I make browser enter to fullscreen mode? Same as pressing F11.
Upvotes: 8
Views: 40544
Reputation: 106
In recent versions you need to access the webdriver directly so it would be,
driver.maximize_window()
P.S This is the python API.
Upvotes: 0
Reputation: 31
In selenium/ Python: for maximizing window:
driver.maximize_window()
Upvotes: 3
Reputation: 143
Not sure if you know but you can set the size and position of your window as well
webDriver.Manage().Window.Position = new Point(x, y);
webDriver.Manage().Window.Size = new Size(width, height);
Upvotes: 3
Reputation: 22438
Find the body and then send F11 to that like below.
driver.FindElement(By.TagName("body")).SendKeys(Keys.F11);
Upvotes: 4