2012/7/5 Stephen Opalenski <
sopal...@gmail.com>:
>
> The command i'm trying is like this:
>
> python -m robot.libdoc lib/testlibrary.py doc.html
>
> The command 'python -m robot.libdoc lib/testlibrary.py list' doesn't list
> anything. 'Show' only shows the module docstring.
>
> The beginning of the file looks like this:
[snip]
>
> class TestLibrary(Selenium2Library):
> """An extension of the Selenium2Library."""
Your library class TestLibrary is in module testlibrary. Thus you need
to import the library like `testlibrary.TestLibrary` in the test data
and elsewhere. If your class was named the same as the module, Robot
would allow you to use just `LibraryName` (although
`LibraryName.LibraryName` would still work too).
When importing a library using a physical path, like you are doing now
with libdoc, there is no way to specify different class name than
module name. To make documentation generation work, you should thus
use something like this:
python -m robot.libdoc lib/testlibrary.py --pythonpath lib
testlibrary.TestLibrary doc.html
Alternatively you could rename your module and/or class so that they
would have the same name.
Cheers,
.peke
--
Agile Tester/Developer/Consultant ::
http://eliga.fi
Lead Developer of Robot Framework ::
http://robotframework.org