lyh176967
lyh176967
2018-12-16 11:32

火狐浏览器,使用selenium,无法加载配置文件?

  • 开发语言

from selenium import webdriver
from time import sleep

driver=webdriver.Firefox()

打开注册页面

url为地址

url=r"C:\Users\Desktop\learn_book\02img\注册A.html"
driver.get(url)
username=driver.find_element_by_id("userA")
#
username.send_keys("admin")
#
password=driver.find_element_by_id("passwordA")
sleep(3)
driver.quit()

selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: %s If you specified a log_file in the FirefoxBinary constructor, check it for details.


  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答