Skip to content

Commit

Permalink
Merge e96528e into 3b6c84c
Browse files Browse the repository at this point in the history
  • Loading branch information
AlainMiranda committed Mar 17, 2023
2 parents 3b6c84c + e96528e commit 98f22c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion toolium/config_driver.py
Expand Up @@ -354,7 +354,7 @@ def _create_chrome_options(self):

if self.config.getboolean_optional('Driver', 'headless'):
self.logger.debug("Running Chrome in headless mode")
options.add_argument('--headless')
options.add_argument('--headless=new')
if os.name == 'nt': # Temporarily needed if running on Windows.
options.add_argument('--disable-gpu')

Expand Down
4 changes: 2 additions & 2 deletions toolium/test/test_config_driver.py
Expand Up @@ -621,7 +621,7 @@ def test_create_chrome_options_headless(webdriver_mock, config, utils):
config_driver._create_chrome_options()
webdriver_mock.ChromeOptions.assert_called_once_with()
if os.name == 'nt':
webdriver_mock.ChromeOptions().add_argument.assert_has_calls([mock.call('--headless'),
webdriver_mock.ChromeOptions().add_argument.assert_has_calls([mock.call('--headless=new'),
mock.call('--disable-gpu')])
else:
webdriver_mock.ChromeOptions().add_argument.assert_called_once_with('--headless')
webdriver_mock.ChromeOptions().add_argument.assert_called_once_with('--headless=new')

0 comments on commit 98f22c0

Please sign in to comment.