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
10,789 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
sometime a little help can solve a big problem ..thanks ...

I was in the middle of a problem .. Searching solution for  4-5 hours .. thanks
+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 Apr 1 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,890 points
8,603 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,090 points
1,086 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,090 points
110 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
1,063 views