I have researched many articles and simply adding the switch options.add_argument(‘–headless’) causes the script to fail.Īny help would be much appreciated. I’m trying to carry out the above in silent mode using Headless Chrome without any joy. The above script successfully automates the login process into a website using Selenium and prints the username. # Print Username to Test Successful Login # Find Password Field and Send to Input Fieldĭriver.find_element_by_id("fld-password").send_keys(password)Ĭonsent_button_xpath = WebDriverWait(driver, 40).until(EC.element_to_be_clickable((By.XPATH, consent_button_xpath)))Ĭonsent = driver.find_element_by_xpath(consent_button_xpath) # Find Username/Email Field and Send to Input Fieldĭriver.find_element_by_id("email").send_keys(username) Options.add_argument('-disable-notifications')ĭriver = webdriver.Chrome(executable_path="C:webdriverschromedriver.exe",options=options) Options.add_argument('-ignore-certificate-errors-spki-list') Options.add_argument('-ignore-certificate-errors') From import Byįrom import expected_conditions as ECįrom import WebDriverWait
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |