Skip to content

Commit

Permalink
feat: playwright enable headless config (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogarfe committed Jun 6, 2024
1 parent d1a4090 commit d9b3435
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion toolium/driver_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ def connect_playwright(self, async_loop):
# TODO: should playwright and browser be saved in driver_wrapper?
playwright = async_loop.run_until_complete(async_playwright().start())
# TODO: select browser from config
browser = async_loop.run_until_complete(playwright.chromium.launch(headless=False))
headless_mode = self.config.getboolean_optional('Driver', 'headless')
browser = async_loop.run_until_complete(playwright.chromium.launch(headless=headless_mode))
page = async_loop.run_until_complete(browser.new_page())
return page

Expand Down

0 comments on commit d9b3435

Please sign in to comment.