Updates:
Summary: User Guide fixes
Status: Started
Comment #1 on issue 992 by pekka.klarck: User Guide fixes
http://code.google.com/p/robotframework/issues/detail?id=992
1) The problem seems to be that you have put the example functions into a
class. As discussed in the beginning of the Creating Test Libraries
section, Robot can use both Python modules and classes as libraries.
Methods in Python classes must have self as the first argument but
functions in modules should not have. For example, both of the simple
examples below are valid libraries:
-------------------------------
def return_two_values():
return 'first value', 'second value'
-------------------------------
class MyLibrary:
def return_two_values(self):
return 'first value', 'second value'
-------------------------------
2) Thanks, I'll fix that.
3) I didn't have any problem with the example. What I did was copying the
code as-is to a file called testlib.py and using it from a test case file
like this:
***Settings***
Library ./testlib.py
***TestCases***
Example Test
Example Keyword
Based on 1) and 3) it seems to be that the section needs more examples with
both the library code and tests using them. And the examples should
preferably be available as a download. There's already issue 49 about
adding more examples in general. It's the oldest open issue in this tracker
but it seems getting time to actually do something to it isn't easy. I
wonder could we get community involved with that somehow.