Selenium chrome: I just can't use driver.maximize_window() to maximize window

时间:2017-04-06 17:00:41

标签: python google-chrome selenium

I don't know why I just can't use driver.maximize_window() to maximize window.It worked before .And Exception is : enter image description here

2 个答案:

答案 0 :(得分:1)

Download chrome driver 2.28 from below path. This issue got fixed in this version

----------ChromeDriver v2.28 (2017-03-09)----------

Supports Chrome v55-57

Resolved issue 1625: Error: cannot get automation extension on Chrome57+ [['OS-All', 'Pri-1', 'merge-merged-2987']]

Resolved issue 1695: Chrome crashes on Linux32 bot [['OS-Linux', 'Pri-1']]

Resolved issue 1467: A hang occurs when an alert dialog is displayed on Chrome 52+ [['OS-All', 'Pri-2']]

Resolved issue 1688: Exported Netlog with --log-net-log is truncated [['OS-Linux', 'OS-Mac', 'Pri-2']]

Resolved issue 1388: find Elements is failing [['Pri-2']] .

https://chromedriver.storage.googleapis.com/index.html

答案 1 :(得分:0)

在使用crome驱动程序时,建议通过ChromeOptions类最大化浏览器窗口,如下所示:

ChromeOptions options = new ChromeOptions();
options.addArguments("start-maximized");
driver.get(url); 

PS:这是Java语法,相应地进行转换。

如果这有助于您,请告诉我。

相关问题