51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 5417|回复: 19

Selenium3离线包+Python2.7+谷歌驱动自动化环境搭建

[复制链接]
  • TA的每日心情
    无聊
    2017-11-26 18:46
  • 签到天数: 382 天

    连续签到: 1 天

    [LV.9]测试副司令

    发表于 2017-5-24 14:21:08 | 显示全部楼层 |阅读模式
    Selenium3离线包+Python2.7+谷歌驱动自动化环境搭建

    ---需要的就自行到附件免费下载吧,个人原创,请勿盗版

    本帖子中包含更多资源

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

    x

    评分

    参与人数 1测试积点 +10 收起 理由
    lsekfe + 10 赞一个!

    查看全部评分

    回复

    使用道具 举报

  • TA的每日心情
    开心
    2017-6-12 22:13
  • 签到天数: 2 天

    连续签到: 1 天

    [LV.1]测试小兵

    发表于 2017-6-13 01:12:33 | 显示全部楼层
    C:\Users\Albert\Desktop

    怎么没有出现版本信息呢,我环境变量也改了
    回复 支持 反对

    使用道具 举报

  • TA的每日心情

    2018-5-29 09:28
  • 签到天数: 8 天

    连续签到: 1 天

    [LV.3]测试连长

    发表于 2017-6-14 14:28:06 | 显示全部楼层
    有对应的使用方法说明不。谢谢。
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    无聊
    2017-11-26 18:46
  • 签到天数: 382 天

    连续签到: 1 天

    [LV.9]测试副司令

     楼主| 发表于 2017-6-14 15:23:44 | 显示全部楼层
    阿星爱美酒 发表于 2017-6-14 14:28
    有对应的使用方法说明不。谢谢。

    不清楚你所说的使用方法说明是什么意思。。。
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    无聊
    2017-11-26 18:46
  • 签到天数: 382 天

    连续签到: 1 天

    [LV.9]测试副司令

     楼主| 发表于 2017-6-14 15:24:19 | 显示全部楼层
    Brain_vpkung 发表于 2017-6-13 01:12
    怎么没有出现版本信息呢,我环境变量也改了

    不清楚你具体是哪个步骤有问题,建议你截图出来看看
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2017-6-16 13:23:08 | 显示全部楼层
    楼主辛苦了啊
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2017-6-20 16:06:50 | 显示全部楼层
    配置后谷歌启动不了
    ython 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32
    Type "copyright", "credits" or "license()" for more information.
    >>>
    ================= RESTART: C:/Users/joyce-pc/Desktop/test.py =================

    Traceback (most recent call last):
      File "C:/Users/joyce-pc/Desktop/test.py", line 3, in <module>
        browser = webdriver.chromedriver()
    AttributeError: 'module' object has no attribute 'chromedriver'
    >>>
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    擦汗
    2019-7-20 17:20
  • 签到天数: 143 天

    连续签到: 1 天

    [LV.7]测试师长

    发表于 2017-10-18 16:37:28 | 显示全部楼层
    ============ RESTART: C:\Program Files\Python36\web-auto-test.py ============
    Traceback (most recent call last):
      File "C:\Program Files\Python36\web-auto-test.py", line 3, in <module>
        browser = webdriver.chromedriver()
    AttributeError: module 'selenium.webdriver' has no attribute 'chromedriver'
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    无聊
    2017-11-26 18:46
  • 签到天数: 382 天

    连续签到: 1 天

    [LV.9]测试副司令

     楼主| 发表于 2017-10-18 17:07:23 | 显示全部楼层
    丰卉者 发表于 2017-10-18 16:37
    ============ RESTART: C:\Program Files\Python36\web-auto-test.py ============
    Traceback (most recen ...

    使用:
    browser = webdriver.Chrome()
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    无聊
    2017-11-26 18:46
  • 签到天数: 382 天

    连续签到: 1 天

    [LV.9]测试副司令

     楼主| 发表于 2017-10-18 17:07:37 | 显示全部楼层
    fuzizhichenxin2 发表于 2017-6-20 16:06
    配置后谷歌启动不了
    ython 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (A ...

    使用:
    browser = webdriver.Chrome()
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    擦汗
    2019-7-20 17:20
  • 签到天数: 143 天

    连续签到: 1 天

    [LV.7]测试师长

    发表于 2017-10-19 09:05:04 | 显示全部楼层
    Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
    Type "copyright", "credits" or "license()" for more information.
    >>>
    ================= RESTART: C:\Program Files\Python36\zcl.py =================
    Traceback (most recent call last):
      File "C:\Program Files\Python36\zcl.py", line 2, in <module>
        browser = webdriver.Chrome()
      File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
        desired_capabilities=desired_capabilities)
      File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 151, in __init__
        self.start_session(desired_capabilities, browser_profile)
      File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 240, in start_session
        response = self.execute(Command.NEW_SESSION, parameters)
      File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 308, in execute
        self.error_handler.check_response(response)
      File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response
        raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
      (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 6.1.7601 SP1 x86_64)

    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    擦汗
    2019-7-20 17:20
  • 签到天数: 143 天

    连续签到: 1 天

    [LV.7]测试师长

    发表于 2017-10-19 09:06:53 | 显示全部楼层
    使用这个后:
    browser = webdriver.Chrome()

    报以下错误:百度之后,也没有找到解决办法
    Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
    Type "copyright", "credits" or "license()" for more information.
    >>>
    ================= RESTART: C:\Program Files\Python36\zcl.py =================
    Traceback (most recent call last):
      File "C:\Program Files\Python36\zcl.py", line 2, in <module>
        browser = webdriver.Chrome()
      File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
        desired_capabilities=desired_capabilities)
      File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 151, in __init__
        self.start_session(desired_capabilities, browser_profile)
      File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 240, in start_session
        response = self.execute(Command.NEW_SESSION, parameters)
      File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 308, in execute
        self.error_handler.check_response(response)
      File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response
        raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
      (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 6.1.7601 SP1 x86_64)
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    无聊
    2017-11-26 18:46
  • 签到天数: 382 天

    连续签到: 1 天

    [LV.9]测试副司令

     楼主| 发表于 2017-10-19 09:11:16 | 显示全部楼层
    丰卉者 发表于 2017-10-19 09:05
    Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
    Type "cop ...

    我用的是Python2.7的,3.6版本下没测试过。。。

    看报错提示想找不到谷歌的库文件,或者你再装一下Selenium
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    擦汗
    2019-7-20 17:20
  • 签到天数: 143 天

    连续签到: 1 天

    [LV.7]测试师长

    发表于 2017-10-19 13:52:03 | 显示全部楼层
    你有ChromeDriver 2.33版本win64位的驱动吗?
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    无聊
    2017-11-26 18:46
  • 签到天数: 382 天

    连续签到: 1 天

    [LV.9]测试副司令

     楼主| 发表于 2017-10-19 14:30:17 | 显示全部楼层
    丰卉者 发表于 2017-10-19 13:52
    你有ChromeDriver 2.33版本win64位的驱动吗?

    https://chromedriver.storage.googleapis.com/index.html?path=2.33/


    这个是谷歌驱动的网址,自行去下载吧。。。Windows下是没有64位的驱动的
    回复 支持 反对

    使用道具 举报

  • TA的每日心情

    2018-4-9 11:09
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    发表于 2018-4-9 11:20:41 | 显示全部楼层

    Selenium3离线包 再哪下载啊,新来的,不懂
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    2020-6-29 16:48
  • 签到天数: 28 天

    连续签到: 1 天

    [LV.4]测试营长

    发表于 2020-2-19 18:03:40 | 显示全部楼层
    好东西呀,感谢楼主啦
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-4-19 02:29 , Processed in 0.078232 second(s), 25 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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