MavenPlugin icon indicating copy to clipboard operation
MavenPlugin copied to clipboard

Won't import test library modules

Open incogniro opened this issue 5 years ago • 1 comments

Trying to use either the AngularJSLibrary or ExtendedSelenium2Libray by placing the folders beneath src/test/resources/libraries. The modules are never loaded when referenced. I've also tried adding a configuration section in the pom.xml which points to the libraries folder and also the folder of the module. This has no effect either.

[ ERROR ] Error in file '/src/test/robotframework/resource.robot': Importing test library 'AngularJSLibrary' failed: ImportError: No module named AngularJSLibrary Traceback (most recent call last): None PYTHONPATH: /.m2/repository/org/robotframework/robotframework/3.1.2/Lib /.m2/repository/org/robotframework/robotframework/3.1.2/robotframework-3.1.2.jar/Lib classpath pyclasspath/ CLASSPATH: /usr/local/Cellar/maven/3.6.3/libexec/boot/plexus-classworlds-2.6.0.jar

Any assistance appreciated.

incogniro avatar Feb 07 '20 11:02 incogniro

According https://robotframework.org/MavenPlugin/run-mojo.html#extraPathDirectories path of the libraries need to be (by default) ${project.basedir}/src/test/resources/robotframework/libraries.

Example also here: https://robotframework.org/MavenPlugin/examples/seleniumlibrary.html.

When running with Java I think it would make more sense to use Java SeleniumLibrary, but if course that way there's no e.g. Angular specific keywords available. But as seen in the example, usin Python libraries mean that dependencies need to be available, too.

Hi-Fi avatar Feb 07 '20 18:02 Hi-Fi