2014-02-21 58 views
1

我當我使用的唯一功能使用python 創建Robot Framework的關鍵字,然後乘車可檢測關鍵字機器人框架::進口圖書館「類」不包含關鍵字

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

然而,當我使用

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

我加入庫如下

*** Settings *** 

Library   hello 

我已經把.py文件與測試用例位於同一目錄中。

Imported library "Name of the Class" contains no keywords 

請幫忙。

謝謝。

回答

1

好吧,我發現我的錯誤,我需要把圖書館fileName.ClassName,它解決了這一問題

+1

如果類名相匹配的文件名,你可以從進口下降的文件名。 – ombre42