Reputation: 148
I tried calling the Python function using Get Library Instance Builtin Method of Robot Framework, but getting the error as "Keyword name cannot be empty". My Testcase code is
*** Settings ***
Documentation This is the register API testsuite
Library ../../lib/ServerAPI.py ${FEIP} ${DBIP} ${schemaid} ${appid} ${subscriber}
*** Test Cases ***
[TC-001]-Registering a device with INVALID SUBSCRIBER name to the server
${serverlib}= Get Library Instance ServerAPI
log ${serverlib}
log ${serverlib.subscriber}
${serverlib.register device} ${token} ${devid}
For the line ${serverlib.register device} ${token} ${devid}
, i'm getting the error "Keyword name cannot be empty".register_device
is one of the function in the file ServerAPI.py
The log lines above log ${serverlib}
is giving me ServerAPI object. I'm not sure if its the correct way to call the functions from a python Library.
Upvotes: 0
Views: 2016
Reputation: 385970
If register_device
is a function in the library, you just call it directly:
Register device ${token} ${devid}
Upvotes: 1