Hi Shiv,
I suspect it might be the line:
def __init__(self) -> None:
Causing you trouble?
I built an example matching your screen shot as best I can (I don;t have the testbenchfactory module), that line gave me the error:
Error in file 'robot_keywords.resource' on line 2: Importing library 'Custom_Library.py' failed: IndentationError: expected an indented block after function definition on line 2 (Custom_Library.py, line 4)
I changed it to syntax I’m more familiar with:
def __init__(self):
pass
Here is my full example, you can copy them to another folder and try them out to see if you can reproduce my result, as that might help you trouble shoot your issue
robot_new.robot
*** Settings ***
Resource robot_keywords.resource
*** Variables ***
${vendor_name} "dSPACE GmbH"
${API_name} "XIL API"
${Version} "2021-B"
*** Test Cases ***
Testbench Creation
${Testbench_created}= Craete X11 Testbench ${vendor_name} ${API_name} ${Version}
robot_keywords.resource
*** Settings ***
Library Custom_Library.py
*** Keywords ***
Craete X11 Testbench
[Arguments] ${vendor_name} ${API_name} ${Version}
Log ${vendor_name}
Log ${API_name}
Log ${Version}
${Testbench_created}= Creating New Testbench ${vendor_name} ${API_name} ${Version}
RETURN ${Testbench_created}
Custom_Library.py
class Custom_Library:
# def __init__(self) -> None:
def __init__(self):
pass
def creating_new_testbench(self, vendor_name, api_name, version):
print("vendor_name:", vendor_name, " api_name:", api_name, " version:", version)
return ":|:".join([vendor_name, api_name, version])
And here is a screen shot of my log, you can see the variables are passed to the python function and back to the resource file and eventually back to the test case:
Hope this helps you find the problem,
Dave.