擅长:python、mysql、java
<p>因为那是Java。Python的文档是<a href="http://seleniumhq.github.io/selenium/docs/api/py/index.html" rel="noreferrer">here</a>。</p>
<p>有一个名为<code>set_window_size</code>的方法,它被定义为<a href="https://github.com/SeleniumHQ/selenium/blob/master/py/selenium/webdriver/remote/webdriver.py" rel="noreferrer">here</a>:</p>
<pre><code>driver.set_window_size(1400,1000)
</code></pre>
<p>进一步阅读:<a href="http://yizeng.me/2014/02/23/how-to-get-window-size-resize-or-maximize-window-using-selenium-webdriver/" rel="noreferrer">How to get window size, resize or maximize window using Selenium WebDriver</a></p>