ExtendedSelenium2Library - 失败:ImportError:没有名为keywords的模块

时间:2017-12-11 19:10:07

标签: python selenium robotframework ui-automation

我从一个基本上运行robot.bat命令的批处理文件运行。 关于为什么会成为问题以及如何解决这个问题的任何建议?我看到包安装正确。这是我第一次尝试进行测试。

    $ ./bin/run-windows.bat
>C:\Users\kondalar\workspace\rafa\cra-ui-qa>robot.bat --pythonpath C:/Users/kondalar/apps/conda/envs/robot-cray-ui-test2 --critical Critical --outputdir ..\report --variablefile C:/Users/kondalar/workspace/rafa/cra-ui-qa/config/windows-local-config.py C:/Users/kondalar/workspace/rafa/cra-ui-qa/cases/01*
                    [ ERROR ] Error in file 'C:\Users\kondalar\workspace\rafa\cra-ui-qa\resources\project-import.robot': Importing test library 'C:/Users/kondalar/apps/conda/envs/robot-cray-ui-test2/Lib/site-packages/ExtendedSelenium2Library' failed: ImportError: No module named keywords
                    Traceback (most recent call last):
                      File "C:\Users\kondalar\apps\conda\envs\robot-cray-ui-test2\Lib\site-packages\ExtendedSelenium2Library\__init__.py", line 27, in <module>
                        from ExtendedSelenium2Library.keywords import ExtendedElementKeywords
                      File "C:\Users\kondalar\apps\conda\envs\robot-cray-ui-test2\Lib\site-packages\ExtendedSelenium2Library\keywords\__init__.py", line 24, in <module>
                        from ExtendedSelenium2Library.keywords.extendedelement import ExtendedElementKeywords
                      File "C:\Users\kondalar\apps\conda\envs\robot-cray-ui-test2\Lib\site-packages\ExtendedSelenium2Library\keywords\extendedelement.py", line 27, in <module>
                        from Selenium2Library.keywords import _ElementKeywords
                    PYTHONPATH:
                      C:\Users\kondalar\apps\conda\envs\robot-cray-ui-test2
                      C:\Users\kondalar\apps\conda\envs\robot-cray-ui-test2
                      C:\Users\kondalar\apps\conda\envs\robot-ui-test\python27.zip
                      C:\Users\kondalar\apps\conda\envs\robot-ui-test\DLLs
                      C:\Users\kondalar\apps\conda\envs\robot-ui-test\lib
                      C:\Users\kondalar\apps\conda\envs\robot-ui-test\lib\plat-win
                      C:\Users\kondalar\apps\conda\envs\robot-ui-test\lib\lib-tk
                      C:\Users\kondalar\apps\conda\envs\robot-ui-test
                      C:\Users\kondalar\apps\conda\envs\robot-ui-test\lib\site-packages



      $ conda list

>packages in environment at C:\Users\kondalar\apps\conda\envs\robot-cray-ui-test2:

                    certifi                   2017.11.5        py27h03b45e1_0
                    chardet                   3.0.4                     <pip>
                    coverage                  4.4.2                     <pip>
                    decorator                 4.1.2                     <pip>
                    idna                      2.6                       <pip>
                    jsonpath-rw               1.4.0                     <pip>
                    jsonpath-rw-ext           1.1.3                     <pip>
                    pbr                       3.1.1                     <pip>
                    pip                       9.0.1            py27hdaa76b4_4
                    pluggy                    0.6.0                     <pip>
                    ply                       3.10                      <pip>
                    py                        1.5.2                     <pip>
                    python                    2.7.13              h1b6d89f_16
                    requests                  2.18.4                    <pip>
                    robotframework            3.0.2                     <pip>
                    robotframework-databaselibrary 1.0.1                     <pip>
                    robotframework-debuglibrary 0.8.1                     <pip>
                    robotframework-extendedselenium2library 0.9.1                     <pip>
                    robotframework-jsonlibrary 0.2                       <pip>
                    robotframework-requests   0.4.7                     <pip>
                    robotframework-selenium2library 3.0.0                     <pip>
                    robotframework-seleniumlibrary 3.0.0                     <pip>
                    selenium                  3.8.0                     <pip>

1 个答案:

答案 0 :(得分:1)

ExtendedSelenium2Library不支持SeleniumLibrary版本3.它正在尝试导入Selenium2Library中的版本3中不再存在的内容。