Importing library failed: in robotframework

Sadha Nanda

I have created python file and trying to import that to my robot project.Below is the python file name helloworld.py,

class   helloworld:
    ROBOT_LIBRARY_SCOPE = 'TESTCASE'
    def fun_scope(self):
        print("Hello World")

Below is the robot script,

*** Settings ***
Library    helloworld

*** Test Cases ***

TC1
    Fun Scope

While executing i am getting below error,

[ ERROR ] Error in file '/home/sadha/PycharmProjects/NotificationService/Test/custom.robot' on line 2: Importing library 'helloworld' failed: ModuleNotFoundError: No module named 'helloworld'
Traceback (most recent call last):
  None
PYTHONPATH:
  /home/sadha/PycharmProjects/NotificationService/venv/bin
  /usr/lib/python38.zip
  /usr/lib/python3.8
  /usr/lib/python3.8/lib-dynload
  /home/sadha/PycharmProjects/NotificationService/venv/lib/python3.8/site-packages

I tried all the possible solution but nothing worked :(

Jiri Janous

Specifing the name of the library fixes the problem. Just use helloworld.py in your robot.

*** Settings ***
Library    helloworld.py

*** Test Cases ***

TC1
    Fun Scope

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Issue with importing SeleniumLibrary into Robotframework

From Dev

Robotframework Taking screenshot failed

From Dev

Robotframework DateTime Library

From Dev

RobotFramework RIDE cannot import library

From Dev

Error while importing Tensorflow. A dynamic link library (DLL) initialization routine failed

From Java

importing library into java

From Dev

Pysoundfile library not importing

From Dev

Importing JavaScript Library into NativeScript

From Dev

Importing library into an Android project?

From Dev

Importing a library with cocoapods

From Dev

Importing/loading library with chunks

From Dev

Pycharm not importing standard library

From Dev

RobotFramework - Calling a function from python library

From Dev

executing command via ssh library in robotframework

From Dev

Import Python Library in RobotFramework Unicode Issue

From Dev

How to use functions properly Robotframework IMAP library

From Dev

Python: "ImportError: DLL load failed: The specified module could not be found." Problems when importing ffn (finance library for python)

From Python

Cannot import from pywinauto: ImportError: DLL load failed while importing win32ui: A dynamic link library (DLL) initialization routine failed

From Dev

Importing JSON library into IntelliJ IDEA

From Dev

Importing Eclipse Library Project into AndroidStudio

From Java

Eclipse - Importing your own library

From Dev

importing a library only for debugging, not for release

From Dev

Simplify importing for my library at pip

From Dev

Importing a JS npm library in Svelte

From Dev

Importing library once for a python module

From Dev

Importing JFoenix library to SceneBuilder - javaFX

From

Importing local library and files in an application

From Dev

Importing GraphStream library in NetBeans 8.0

From Dev

Importing library project in Android Studio

Related Related

  1. 1

    Issue with importing SeleniumLibrary into Robotframework

  2. 2

    Robotframework Taking screenshot failed

  3. 3

    Robotframework DateTime Library

  4. 4

    RobotFramework RIDE cannot import library

  5. 5

    Error while importing Tensorflow. A dynamic link library (DLL) initialization routine failed

  6. 6

    importing library into java

  7. 7

    Pysoundfile library not importing

  8. 8

    Importing JavaScript Library into NativeScript

  9. 9

    Importing library into an Android project?

  10. 10

    Importing a library with cocoapods

  11. 11

    Importing/loading library with chunks

  12. 12

    Pycharm not importing standard library

  13. 13

    RobotFramework - Calling a function from python library

  14. 14

    executing command via ssh library in robotframework

  15. 15

    Import Python Library in RobotFramework Unicode Issue

  16. 16

    How to use functions properly Robotframework IMAP library

  17. 17

    Python: "ImportError: DLL load failed: The specified module could not be found." Problems when importing ffn (finance library for python)

  18. 18

    Cannot import from pywinauto: ImportError: DLL load failed while importing win32ui: A dynamic link library (DLL) initialization routine failed

  19. 19

    Importing JSON library into IntelliJ IDEA

  20. 20

    Importing Eclipse Library Project into AndroidStudio

  21. 21

    Eclipse - Importing your own library

  22. 22

    importing a library only for debugging, not for release

  23. 23

    Simplify importing for my library at pip

  24. 24

    Importing a JS npm library in Svelte

  25. 25

    Importing library once for a python module

  26. 26

    Importing JFoenix library to SceneBuilder - javaFX

  27. 27

    Importing local library and files in an application

  28. 28

    Importing GraphStream library in NetBeans 8.0

  29. 29

    Importing library project in Android Studio

HotTag

Archive