user1478926
user1478926

Reputation: 45

Robot Framework:: Imported library 'class' contains no keywords

I am creating Robot Framework keyword using python When I use only function, then RIDE can detect the keyword

def hello_world (patient):
  print ('Hello')

However when I am using

class helloAll(object):
 def hello_world (patient):
  print ('Hello')

I am adding the library as below

*** Settings ***

Library           hello

I have placed the .py file in the same directory as the test case.

Imported library "Name of the Class" contains no keywords

Please help.

Thanks.

Upvotes: 2

Views: 9108

Answers (1)

user1478926
user1478926

Reputation: 45

Ok I found my mistake, I needed to put Library fileName.ClassName , it fixed the issue

Upvotes: 1

Related Questions