2

i am facing difficulty when trying to run my tests. Here is what i did :

  1. Create a java project with one class which has one method called hello(String name)
  2. Exported this as a jar and kept it in the same directory where i keep my test case file.
  3. my Test case looks like this.

    • Setting * * Value * * Value * * Value * * Value * * Value *

      Library MyLibrary

    • Variable * * Value * * Value * * Value * * Value * * Value *

      • Test Case * * Action * * Argument * * Argument * * Argument * * Argument * MyTest
        hello World

      • Keyword * * Action * * Argument * * Argument * * Argument * * Argument *

I always get the following error :

Error in file 'C:\Users\yahiya\Desktop\robot-practice\testcase_template.tsv' in table 'Setting': Importing test library 'MyLibrary' failed: ImportError: No module named MyLibrary

I have configured Pythopath in the system variables in my windows machine.

Please let me know what am i doing wrong here.

Thanks

Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
af_khan
  • 1,030
  • 4
  • 25
  • 49

2 Answers2

0

Try to put your Library into this folder:

...YourPythonFolder\Lib\site-packages\

or, if this doesn't work, make in the folder "site-packages" folder with the name "MyLibrary" and put your library there.

This should work.

Bfcm
  • 2,686
  • 2
  • 27
  • 34
0

There might a problem with how you import your library. I don't have much experience with Java libraries but you need to provide the whole name, including the package name, when importing a library.

Read more in the guide.

finspin
  • 4,021
  • 6
  • 38
  • 66