For bypassing SSL and for running in headless mode

# for running in headless mode

chrome_options = Options() 

chrome_options.add_argument("headless")

driver = webdriver.Chrome(service=service_obj, options=chrome_options)


#taking screenshot
driver.get_screenshot_as_file("filename.png")




# for bypassing SSL

chrome_options = Options() 

chrome_options.add_argument("--ignore-certificate-errors")
driver = webdriver.Chrome(service=service_obj, options=chrome_options)

Comments

Popular posts from this blog

Assertion to check that the text is not displayed when Hide button is clicked

accessing frame through selenium and switching back to the original content

Running javascript commands inside a python file through selenium