How to set window size using phantomjs and selenium webdriver in python

試著忘記壹切 提交于 2019-12-03 05:18:17

Because that's Java. Python's documentation is here.

There's a method called set_window_size, which is defined here:

driver.set_window_size(1400,1000)

Further reading: How to get window size, resize or maximize window using Selenium WebDriver

For Java, the Dimension import has to be:

import org.openqa.selenium.Dimension;

and it won't give syntax errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!