python elenium3 加载Firefox配置问题

z326186713 2017-07-05 05:11:21

from selenium import webdriver
# 配置文件地址
profile_dir = r'C:\Users\Administrator\AppData\Roaming\Mozilla\Firefox\Profiles\wwahq4zz.default'
# 加载配置配置
firefox_profile = webdriver.FirefoxProfile(profile_dir)
# 启动浏览器配置
driver = webdriver.Firefox(firefox_profile)

请问第7行哪错了
__init__
if isinstance(firefox_profile, types.StringTypes):
AttributeError: module 'types' has no attribute 'StringTypes'
...全文
486 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

37,721

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧