Hi all. Cannot use keyword from custom library. Does anybody have any conclusions?
*.robot file:
*** Settings ***
Library RequestsLibrary
Library Collections
Library JSONLibrary
Library OperatingSystem
Library ../../utilities/ResponseParser.py #path is really right, when I typing in robot file - it recognises the keyword from the library
Resource ../keywords.resource
*** Variables ***
${controller} product
${endpoint} lookup
*** Test Cases ***
TC_01_Product
...
${results}= generate expected result ${controller} ${endpoint}
...
ResponseParser.py
from robot.api.deco import library, keyword
@library
class ResponseParser:
def __init__(self):
self.driver = ""
@keyword
def generate_expected_result(self, controller, endpoint) -> dict:
response = {controller: endpoint}
return response
when I run test there is a message: No keyword with name 'generate expected result' found.