Good morning,
I've seen in the RobotFramework documentation that it is possible to create keyword in python directly (http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#creating-user-keywords)
for instance the do_nothing function.
def hello(name):
print "Hello, %s!" % name
def do_nothing():
pass
It works very well, but the issue is that this has to be added in the variable PYTHONPASS, or in the directory that contains the file.
The issue is that the tests can be performed on more than one computer, and it means that the this variable should be modified on every computer that should run the tests.
Second point, unfortunately my file will be used in several dir.
eg:
A
A/B
A/B/C <== use here
A/B/D
A/B/E <== use here
...
and so one..
Is it possible to add directly the function at A level only once for instance?
Or is it possible to add it once in the section Keywords of RobotFramework at the A directory level and reference it directly in C and E robot files:
A/lib.robot:
*** Keywords ***
def hello(name):
print "Hello, %s!" % name
def do_nothing():
pass
C and E:
*** Settings ***
Resource ../../A/lib.robot