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

对着背影说爱祢 提交于 2020-01-15 11:13:11

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/21945310/robot-framework-imported-library-class-contains-no-keywords

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!