From 91481058d5a6a4179a3c8c3b079cba1e664f4a22 Mon Sep 17 00:00:00 2001 From: Sudharshan Venkatesh Date: Sun, 1 Nov 2020 14:00:50 -0500 Subject: [PATCH] Add support for incognito mode --- webbot/webbot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webbot/webbot.py b/webbot/webbot.py index 5e9efa7..97d70e1 100644 --- a/webbot/webbot.py +++ b/webbot/webbot.py @@ -37,10 +37,12 @@ class Browser: - List containing all the errors which might have occurred during performing an action like click ,type etc. """ - def __init__(self, showWindow=True, proxy=None , downloadPath:str=None): + def __init__(self, showWindow=True, proxy=None , downloadPath:str=None, incognito=False): options = webdriver.ChromeOptions() options.add_argument("--disable-dev-shm-usage") options.add_argument("--no-sandbox") + if incognito: + options.add_argument("--incognito") if downloadPath is not None and isinstance(downloadPath,str): absolutePath = os.path.abspath(downloadPath) if(not os.path.isdir(absolutePath)):