We created extensions for Chrome, Firefox and Safari and we want to test our extensions with Selenium. We have an Ubuntu server and I installed Firefox and Chrome in it (wit
For Chromejust add before "webdriver.Chrome" init:
chrome_options.add_argument("--window-size=1920x1080")
For all browsers:
There is an official selenium python binding for that: http://selenium.googlecode.com/git/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html#selenium.webdriver.remote.webdriver.WebDriver.set_window_size
driver.set_window_size(1920, 1080)
or
driver.maximize_window()
or with javascript
driver.execute_script("window.resizeTo(1920,1080)")
driver.set_window_size(width, height)
If you don't know the width and height use the How Big Is My Browser website.