While integrating Robot framework tests in my maven it fails to import library

I’m trying to integrate my robot framework tests in maven …It works for small hello world code. But while i try to import some library E.g RequestsLibrary it fails.

Importing library ‘RequestsLibrary’ failed: ImportError: No module named RequestsLibrary

Hi @Adhavan,

You need to ensure the libraries you want to use are installed on the machine that maven is executing the test cases.

If maven is creating a virtual machine or container for the test execution, the you might need to update the definition for the test machine to install the required libraries. Look at how the definition for the test machine instructs the installation of robot framework as installing the needed libraries should be a similar pip command.

FYI - I have never used maven so I can’t give exact instructions only the concepts.


Thanks Dave ! I tried to create ‘requirements.txt’ with required dependencies and used pip install to install them while executing the maven build…it seems to work fine now

1 Like