Commit afc6f965 authored by Vincent Ardisson's avatar Vincent Ardisson Committed by Romain Bignon

weboob.browser.selenium: allow changing rendering window size

This can be useful for responsive sites.
parent f0883f83
......@@ -403,6 +403,14 @@ class SeleniumBrowser(object):
"""Default wait time for `wait_*` methods"""
WINDOW_SIZE = None
"""Rendering window size
It can be useful for responsive websites which show or hide elements depending
on the viewport size.
"""
BASEURL = None
MAX_SAVED_RESPONSES = (1 << 30) # limit to 1GiB
......@@ -475,6 +483,9 @@ class SeleniumBrowser(object):
else:
raise NotImplementedError()
if self.WINDOW_SIZE:
self.driver.set_window_size(*self.WINDOW_SIZE)
### Browser
def deinit(self):
if self.driver:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment