我编写了用于登录网页的代码。
from selenium import webdriver
browser = webdriver.Firefox()
browser.get(URL)
username = browser.find_element_by_id("username")
password = browser.find_element_by_id("password")
username.send_keys("hello")
password.send_keys("hello")
login_attempt = browser.find_element_by_xpath("//*[@type='submit']")
login_attempt.submit()
browser.firefox_profile.accept_untrusted_certs = True
但我收到此错误
AttributeError: 'NoneType' object has no attribute
'accept_untrusted_certs'
如何解决?