Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9039661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:47:03+00:00 2026-06-16T09:47:03+00:00

I am using Selenium and for this task I need to maximize the browser

  • 0

I am using Selenium and for this task I need to maximize the browser after the page is loaded, the problem is that I am getting the following error and can’t seem to understand how to solve it.

AttributeError: 'WebDriver' object has no attribute 'window_maximize'

Here is the code I am testing

from pyvirtualdisplay import Display
from ftplib import FTP
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0
from selenium.webdriver.common.keys import Keys

#initialize HIDDEN display
display = Display(visible=0, size=(1366, 768))
display.start()


browser = webdriver.Firefox()

browser.get('http://youtube.com/')
browser.window_maximize();
...

Isn’t window_maximize an attribute of the browser?

I am using python and Selenium Server 2.28

Any tip much appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T09:47:04+00:00Added an answer on June 16, 2026 at 9:47 am

    OK, after much looking for how to use window_maximize I found out I can use browser.set_window_size(800, 600) instead.

    I tested and it works fine. It is important to set the browser to browser.set_window_position(0, 0)

    The answer was found here How to maximize a browser window using the Python bindings for Selenium 2-WebDriver?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to automate some GUI tasks using Selenium. And integrate this task in
I'm using Selenium 2 (in IE only) and I need to capture all page
I need to take snapshot of webpage and for that I am using selenium
I'm using Selenium IDE 1.8.1 with Firefox 14. I see this exception: [error] Unexpected
I'm using Selenium 2.20 . Why does WebDriver InternetExplorerDriver throw this warning when launching
I am using selenium rc in eclipse with testNG. I need to click on
I'm using Selenium IDE 1.7.2 and Firefox 10.0.2 In the page which I'm writing
Currently I'm using ruby rake to run ALL selenium ruby webdriver scripts that I
I've got a page on website that is using the awesome drag and drop
I'm using Selenium Java 2.0b3 . I have this code: ... WebDriver driver =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.