diff --git a/stackoverflow/login/src/formula/formula.py b/stackoverflow/login/src/formula/formula.py index 4ec9c59..42f75e6 100755 --- a/stackoverflow/login/src/formula/formula.py +++ b/stackoverflow/login/src/formula/formula.py @@ -11,9 +11,12 @@ from webdriver_manager.chrome import ChromeDriverManager def run(email, password, display_name): - print("Logging into stackoverflow.com") - - driver = webdriver.Chrome(ChromeDriverManager().install()) + print("šŸ¤– Logging into stackoverflow.com") + options = webdriver.ChromeOptions() + options.add_argument("--headless") + options.add_argument("--no-sandbox") + options.add_argument("--disable-dev-shm-usage") + driver = webdriver.Chrome(ChromeDriverManager().install(), options=options) try: driver.get("https://stackoverflow.com") @@ -30,7 +33,7 @@ def run(email, password, display_name): expected_conditions.presence_of_element_located((By.CLASS_NAME, "grid--cell.ws-nowrap.fs-body3")) ) assert display_name in elem.text - print("āœ… Logged into stackoverflow.com and accessed profile page.") + print("\nāœ… Logged into stackoverflow.com and accessed profile page.") except Exception as e: message = "āŒ An error occurred while trying to access stackoverflow.com!"