The key is in your naming convention - functions and methods in python should be lowercase and the words should be separated by underscores. If you follow that convention, robot framework will pick up these keywords and allow you to use them in your tests, however in the tests the words should be separated by spaces, and are case insensitive. I believe that of you read the documentation there are ways of exposing keywords without following the standard naming convention, but I would urge you top follow convention, especially of anyone else might have to read your code. I would recommend reading PEP-8 as it gives the main style guidelines.
Further Explanation
Assuming your have the following ReusableModule.py
:
class ReusableModule(object):
def play_button(self, args):
print "Pressed Play"
You would import like so:
Library ReusableModule
and then run the keyword in your test case as Play Button
As long as ReusableModule.py
is in your path when you run the test you should be fine - this means that it is either in your current directory, or $PYTHONPATH - you can check this by running:
python -c "from ReusableModule import ReusableModule"
from the command line - if this works you should be able to run your test