Java &引用;导入测试库';Selenium2图书馆';失败:导入错误:没有名为decorator的模块;机器人框架maven插件

Java &引用;导入测试库';Selenium2图书馆';失败:导入错误:没有名为decorator的模块;机器人框架maven插件,java,python,maven,intellij-idea,robotframework,Java,Python,Maven,Intellij Idea,Robotframework,试图使用RobotFramework Maven插件1.4.6在OS X El Capitan 10.11.6上的IntelliJ 2016.2中的Maven Java项目中运行简单测试 如果通过命令行使用robot运行测试,则测试将打开firefox浏览器,运行并通过: *** Settings *** Library Selenium2Library Suite Teardown Close all browsers *** Variables *** ${BROWSER} fir

试图使用RobotFramework Maven插件1.4.6在OS X El Capitan 10.11.6上的IntelliJ 2016.2中的Maven Java项目中运行简单测试

如果通过命令行使用robot运行测试,则测试将打开firefox浏览器,运行并通过:

*** Settings ***
Library  Selenium2Library
Suite Teardown  Close all browsers

*** Variables ***
${BROWSER}  firefox
${DOMAIN}  google.com
${PAGE_TITLE}  google

*** Test Cases ***
Example
  Open browser  http://${DOMAIN}  ${BROWSER}
  Page Should Contain  ${PAGE_TITLE}
以下是我收到的错误:

Importing test library 'Selenium2Library' failed: ImportError: No module named decorator
下面是我的pom.xml的重要部分:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.19.1</version>
        </plugin>
        <plugin>
            <groupId>org.robotframework</groupId>
            <artifactId>robotframework-maven-plugin</artifactId>
            <version>1.4.6</version>
            <executions>
                <execution>
                    <goals>
                        <goal>run</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

<dependencies>
    <dependency>
        <groupId>com.github.markusbernhardt</groupId>
        <artifactId>robotframework-selenium2library-java</artifactId>
        <version>1.4.0.8</version>
    </dependency>
</dependencies>

org.apache.maven.plugins


我整天都在解决这个问题,一直在寻找,最后终于找到了一条死胡同。任何帮助都将不胜感激。

我知道我做错了什么,我仍然没有运行测试,但我已经解决了这个问题。基本上,如果您使用的是RobotFramework Selenium2Library java端口,您就不需要再按照站点上关于将Selenium2Library置于/src/test/resources/RobotFramework/libaries下的说明进行操作


您不需要在资源目录中包含Selenium2库,它由maven依赖项负责。

您是否尝试过安装
decorator
软件包?RobotFramework maven插件的整个思想是能够在maven项目中使用Robot Framework,而无需安装任何额外的东西,利用Maven的依赖关系管理。必须安装decorator包将与使用插件的整个要点相矛盾。因此,我假设在我这方面存在一些配置问题,我希望这会引起在这方面有专业知识的人的注意。只要你不使用Java8,那么它就不能满足依赖性。