I am facing a similar issue as : Robot Framework:: Imported library 'class' contains no keywords
Here, the user claims to have solved it by adding FileName.ClassName in the Settings section of .robot file. I tried the same, by adding "Library test.MyLib" but gives me the error "Importing test library 'test.MyLib' failed: Module 'test' does not contain 'MyLib'". However, when I remove and revert back to just "Library test", I get a warning as "[ WARN ] Imported library 'test' contains no keywords" and an error as "No keyword with name 'hello' found." My code is as follows :
test.py
class MyLib(object):
__all__ = ['hello']
def __init__(self):
name = "Wrath"
def hello(self, *args):
name = self.args[0]
print "Hello "+name
test.robot
*** Settings ***
Documentation Suite description
Library test
*** Test Cases ***
Test title
[Tags] DEBUG
hello Sloth
*** Keywords ***
It would be really helpful if I'm advised on the above issue. Have tried out official Robot Framework documentation and the few examples on the web, but seems like I'm doing right. But I have a feeling that I'm probably missing out some minor but crucial thing up there. Precisely, the Keyword section maybe?