Problem statement: I have a .robot file which contains a lot of keywords. this is a higher level robot file which does not contains any test cases. I want to list all the keywords name.
What i tried so far ?
from robot.parsing.model import TestData
suite = TestData(parent=None,source="Track2_Keywords.robot")
it gives error
raise NoTestsFound('File has no tests or tasks.') robot.parsing.populators.NoTestsFound: File has no tests or tasks.
also i tried:
from robot.parsing.model import KeywordTable
suite = KeywordTable("Track2_Keywords.robot")
for item in suite:
... print (item.name)
but its empty.