Skip to content

Commit

Permalink
Add --selenium-log-path argument to handle Selenium geckodriver logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Beguier committed May 4, 2020
1 parent 2af865f commit 344032b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Python/EyeWitness.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ def create_cli_parser():
"use (e.g. '80,8080')"))
http_options.add_argument('--prepend-https', default=False, action='store_true',
help='Prepend http:// and https:// to URLs without either')
http_options.add_argument('--selenium-log-path', default='./geckodriver.log', action='store',
help='Selenium geckodriver log path')

resume_options = parser.add_argument_group('Resume Options')
resume_options.add_argument('--resume', metavar='ew.db',
Expand Down
2 changes: 1 addition & 1 deletion Python/modules/selenium_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def create_driver(cli_parsed, user_agent=None):
options = Options()
options.add_argument("--headless")
profile.update_preferences()
driver = webdriver.Firefox(profile, capabilities=capabilities, firefox_options=options)
driver = webdriver.Firefox(profile, capabilities=capabilities, firefox_options=options, service_log_path=cli_parsed.selenium_log_path)
driver.set_page_load_timeout(cli_parsed.timeout)
return driver
except Exception as e:
Expand Down

0 comments on commit 344032b

Please sign in to comment.