I'm new to robotframework and python. Recently I'd try to create custom keyword in python file and then import it by robotframework. It can import normally but I can't call method in python file as a keyword. Here is my example
from robot.api import logger
from robot.utils.asserts import fail
from robot.utils import get_link_path
from robot.libraries.BuiltIn import BuiltIn
from robot.api.deco import keyword
class MyCustomClass():
ROBOT_LIBRARY_VERSION = 1.0
def __init__(self):
pass
def justprint(self):
print('HelloWorld')
I try to call justprint as a keyword but can't.Here is the path in robotframework to call this .py file (../Web/02_RobotScriptExtract/Custom_Selenium_Keywords.py) It doesn't turn red, and I call it as library.
I assume that it is because of library which I imported, any ideas?