I am using Selenium WebDriver and coding in Python
I have looked all over the place and the best I could find were things written in different languages. I also trie
Are you asking to increase the screen magnification?
This will magnify a Firefox browser, Python 2.7
from selenium.webdriver.common.keys import Keys
br = webdriver.Firefox()
zoomAction = ActionChains(br)
body = br.find_element_by_tag_name('body')
for i in range(2):
zoomAction.send_keys_to_element(body,Keys.CONTROL,"+").perform()
You can either use selenium.windowMaxmize();
or if you want to run your test in some specific resolution,You can go with
selenium.getEval("window.resizeTo(X, Y); window.moveTo(0,0);")
browser = webdriver.Firefox()
url = 'http://www.google.com/'
browser.get(url)
browser.maximize_window()
Selenium 2.31.0
driver = webdriver.Firefox()
# Resize the window to the screen width/height
driver.set_window_size(300, 500)
# Move the window to position x/y
driver.set_window_position(200, 200)