diff --git a/toolium/driver_wrapper.py b/toolium/driver_wrapper.py index 560b592a..5a4204db 100644 --- a/toolium/driver_wrapper.py +++ b/toolium/driver_wrapper.py @@ -254,8 +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)) - page = async_loop.run_until_complete(browser.new_page()) + headless_mode = self.config.getboolean_optional('Driver', 'headless') + browser = async_loop.run_until_complete(playwright.chromium.launch(headless=headless_mode)) return page def resize_window(self):