zoukankan      html  css  js  c++  java
  • "'Service' object has no attribute 'process'"

    在安装完robot framework之后,编写了打开浏览器的用例,但是在打开浏览器的步骤一直报错

    问题原因是,虽然下载了selenuim,但是并没有浏览器driver,所以还要单独下载浏览器driver放在path的路径下(如c:python27,c:python27/scripts),这样就可以直接调起来了


     selenium3.0发布以后,在3.0里不再有 Firefox 的驱动了,Mozilla 也把 Firefox 的 driver 独立发布出来了,而这个 driver 就是 geckodriver 了

    所以我把selenium升级到3.0,终于把火狐浏览器掉起来了,成功~~撒花~~~

    selenium升级方法:用cmd的pip命令查看现在可以升级的包,看到里面有selenium,然后用pip命令升级


    具体问题:

     1 command: pybot.bat --argumentfile c:usersyangya~1appdatalocal	empRIDEvud5bz.dargfile.txt --listener C:Python27libsite-packages
    obotidecontrib	estrunnerTestRunnerAgent.py:60343:False E:
    ide项目文件夹客户端弹窗.robot
     2 =================================================================================================================
     3 客户端弹窗                                                                                                       
     4 =================================================================================================================
     5 use_ticket                                                                                               | FAIL |
     6 WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
     7 -----------------------------------------------------------------------------------------------------------------
     8 客户端弹窗                                                                                               | FAIL |
     9 1 critical test, 0 passed, 1 failed
    10 1 test total, 0 passed, 1 failed
    11 =================================================================================================================
    12 Output:  c:usersyangya~1appdatalocal	empRIDEvud5bz.doutput.xml
    13 
    14 [ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: No browser is open
    15 Log:     c:usersyangya~1appdatalocal	empRIDEvud5bz.dlog.html
    16 Report:  c:usersyangya~1appdatalocal	empRIDEvud5bz.d
    eport.html
    17 
    18 Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x0000000003E37668>> ignored
    19 
    20 test finished 20170315 20:19:56

    解决问题1:

    "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x0000000003E37668>> ignored

    解决办法:

    说明是浏览器驱动器没有安装,点击上面的网址安装谷歌浏览器的驱动器,并设置好驱动器的路径到环境变量PATH中去。
    我因为之前设置过Python的环境变量:D:Python27,所以这里直接把下载的chromedriver.exe复制到D:Python27目录下即可,不用额外再设置了。

    分享个链接:http://pan.baidu.com/s/1eSabNH4

    ---恢复内容结束---

  • 相关阅读:
    xshell 使用命令上传、下载文件
    linux extglob模式 和rm反选,除了某个文件外的其他文件全部删除的命令
    vscode
    win10文件夹共享
    jquery-自适应全屏背景轮播动画
    jquery-抖动图组轮播动画
    jquery-leonaScroll-1.2-自定义滚动条插件
    jquery-leonaScroll-1.1-自定义滚动条插件
    JavaScript-JQ实现自定义滚动条插件1.0
    JavaScript-JQ初探实现自定义滚动条
  • 原文地址:https://www.cnblogs.com/mogujiang/p/6556444.html
Copyright © 2011-2022 走看看