Skip to content
Snippets Groups Projects
Commit d2de76e2 authored by ale's avatar ale
Browse files

Remove superfluous chromedriver options

parent 89c6af71
No related branches found
No related tags found
1 merge request!17Upgrade to webpack + Bootstrap4
...@@ -32,8 +32,6 @@ def setup(): ...@@ -32,8 +32,6 @@ def setup():
options.add_argument('--no-sandbox') options.add_argument('--no-sandbox')
options.add_argument('--headless') options.add_argument('--headless')
options.add_argument('--disable-gpu') options.add_argument('--disable-gpu')
options.add_argument('--start-maximized')
options.add_argument('--start-fullscreen')
return webdriver.Chrome(options=options) return webdriver.Chrome(options=options)
...@@ -43,8 +41,8 @@ def save_screenshot(driver, path): ...@@ -43,8 +41,8 @@ def save_screenshot(driver, path):
required_width = driver.execute_script('return document.body.parentNode.scrollWidth') required_width = driver.execute_script('return document.body.parentNode.scrollWidth')
required_height = driver.execute_script('return document.body.parentNode.scrollHeight') required_height = driver.execute_script('return document.body.parentNode.scrollHeight')
driver.set_window_size(required_width, required_height) driver.set_window_size(required_width, required_height)
# driver.save_screenshot(path) # has scrollbar driver.save_screenshot(path) # has scrollbar
driver.find_element_by_tag_name('body').screenshot(path) # avoids scrollbar # driver.find_element_by_tag_name('body').screenshot(path) # avoids scrollbar
driver.set_window_size(original_size['width'], original_size['height']) driver.set_window_size(original_size['width'], original_size['height'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment