Keyword not detected in libdoc generated documentation

I am trying to generate a documentation for some Robot framework keywords. However, I found that libdoc is not detecting python keywords defined inside class.
Here’s a simple example were I was able to replicate this behavior:

Module for testing keyword generartion in class

from robot.api.deco import keyword

class TestClass:
    Test class
    def new_test_keyword(self):
        A test keyword

I am running “libdoc -F rest <file_path> <target_html>” and the keywords does not appear in the generated documentation. However, if I write the same keyword outside the class, it works perfectly.

Am I missing anything here?

The class is not decorated with the @library decorator from robot.api.deco. I suspect that is the reason. Also, the name of the class should be the same as the name of the Python file it resides in (i.e.

1 Like