Maximize WebDriver (Selenium 2) in Python

后端 未结 5 845
醉梦人生
醉梦人生 2021-02-05 06:03

I\'m attempting to write a simple script that checks if I have any gmail emails labeled SOMETHING and then opens a firefox browser window to a login page, after which it goes to

5条回答
  •  醉话见心
    2021-02-05 06:29

    I've never used this functionality before, so I tried it out.

    driver.maximize_window()
    

    This seems to work fine - unless I am using Chrome. I'm not sure if this is a defect, as it works flawlessly in IE9 and Firefox.

    edit: This is a feature which has yet to be implemented in Chromedriver -= Link to issue =-

    edit (8 years later): Apparently this is working in Chrome on Linux and Windows - so, yay! I haven't tested it, but I am optimistic since it has been nearly a decade since the original answer was provided.

提交回复
热议问题