51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 1578|回复: 6

导入selenium后,使用出错,困扰好久的问题,请求大佬帮助

[复制链接]
  • TA的每日心情
    无聊
    昨天 09:28
  • 签到天数: 385 天

    连续签到: 4 天

    [LV.9]测试副司令

    发表于 2020-7-3 15:40:39 | 显示全部楼层 |阅读模式
    1测试积点
    1. Traceback (most recent call last):
    2.   File "C:/Users/东东/PycharmProjects/untitled/23.py", line 2, in <module>
    3.     driver = webdriver.Firefox()
    4.   File "D:\py35\lib\site-packages\selenium-2.48.0-py3.5.egg\selenium\webdriver\firefox\webdriver.py", line 77, in __init__
    5.     self.binary, timeout),
    6.   File "D:\py35\lib\site-packages\selenium-2.48.0-py3.5.egg\selenium\webdriver\firefox\extension_connection.py", line 49, in __init__
    7.     self.binary.launch_browser(self.profile)
    8.   File "D:\py35\lib\site-packages\selenium-2.48.0-py3.5.egg\selenium\webdriver\firefox\firefox_binary.py", line 68, in launch_browser
    9.     self._wait_until_connectable()
    10.   File "D:\py35\lib\site-packages\selenium-2.48.0-py3.5.egg\selenium\webdriver\firefox\firefox_binary.py", line 103, in _wait_until_connectable
    11.     raise WebDriverException("Can't load the profile. Profile "
    12. 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.
    复制代码
    以上是报错信息,下面是我使用的一些版本 python 3.5.4 selenium2.48.0 firfox 35


    附件: 您需要 登录 才可以下载或查看,没有帐号?(注-册)加入51Testing
    回复

    使用道具 举报

  • TA的每日心情
    开心
    2021-5-25 10:48
  • 签到天数: 20 天

    连续签到: 1 天

    [LV.4]测试营长

    发表于 2020-7-3 17:14:23 | 显示全部楼层
    回复

    使用道具 举报

  • TA的每日心情
    奋斗
    2024-3-11 11:36
  • 签到天数: 999 天

    连续签到: 2 天

    [LV.10]测试总司令

    发表于 2020-7-6 09:34:51 | 显示全部楼层
    配置文件加载失败。检查下路径呢。
    回复

    使用道具 举报

  • TA的每日心情
    擦汗
    2024-3-11 10:55
  • 签到天数: 643 天

    连续签到: 1 天

    [LV.9]测试副司令

    发表于 2020-7-6 09:48:23 | 显示全部楼层
    来学习
    回复

    使用道具 举报

  • TA的每日心情
    慵懒
    昨天 10:10
  • 签到天数: 1367 天

    连续签到: 4 天

    [LV.10]测试总司令

    发表于 2020-7-6 10:19:51 | 显示全部楼层
    配置文件地址检查下
    回复

    使用道具 举报

  • TA的每日心情
    奋斗
    昨天 07:17
  • 签到天数: 2636 天

    连续签到: 4 天

    [LV.Master]测试大本营

    发表于 2020-7-6 13:18:04 | 显示全部楼层
    权限是否有问题
    回复

    使用道具 举报

  • TA的每日心情
    开心
    2017-10-26 15:24
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    发表于 2020-7-10 17:10:08 | 显示全部楼层
    先看下火狐浏览器是否是默认安装的,如果不是的话,需要修改配置路径
    driver=webdriver.Firefox(executable_path="浏览器exe文件路径")
    回复

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-3-29 05:42 , Processed in 0.064604 second(s), 22 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表