Allow chromedriver to work under the root user
@@ -150,6 +150,9 @@ def save_spec(spec, fp, mode=None, format=None, driver_timeout=10):
try:
chrome_options = ChromeOptions()
chrome_options.add_argument("--headless")
+ if os.geteuid() == 0:
+ chrome_options.add_argument('--no-sandbox')
+
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.set_page_load_timeout(driver_timeout)
