How to maximize or minimize a browser window using Selenium webdriver with Python?

0 votes
How to maximize or minimize a browser window using Selenium webdriver with Python?
Jul 31, 2019 in Selenium by Pooja
5,002 views

2 answers to this question.

0 votes

Hey Pooja, you can use following commands to maximize or minimize a browser window using Selenium Webdriver:

driver = webdriver.Chrome()
driver.maximize_window()
driver.minimize_window()
answered Jul 31, 2019 by Baldev
+1 vote
from selenium import webdriver

# get initial window size
driver = webdriver.Firefox()
print driver.get_window_size()

# set window size
driver.set_window_size(480, 320)
print driver.get_window_size()

# maximize window
driver.maximize_window()
print driver.get_window_size()
answered 6 days ago by Rajavenkatesh

Related Questions In Selenium

0 votes
1 answer

How to open a browser window in full screen using Selenium WebDriver with C#

Simply Use this: driver.Manage().Window.Maximize(); READ MORE

answered Jun 7, 2018 in Selenium by Samarpit
• 5,870 points
6,504 views
0 votes
1 answer

How to minimize a browser window using Selenium Webdriver?

Hello Kashmira, to minimize a browser window ...READ MORE

answered Jul 15, 2019 in Selenium by Anvi
• 14,010 points
679 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to launch browsers using Python-Selenium?

Hey Nikita, to launch browser in Python-Selenium, ...READ MORE

answered May 24, 2019 in Selenium by Anvi
• 14,010 points
74 views
0 votes
1 answer

How to Hover using Mouse in python using Webdriver

from selenium.webdriver.common.action_chains import ActionChains def hover(self): ...READ MORE

answered Aug 8, 2018 in Selenium by Meci Matt
• 9,460 points
822 views