I'm importing keywords from a seperate python file but when I use this keywords in the robot file an error appear indicating that this keyword is not declared .
For exemple the routine control is declared in UdsServices and when I use it in a test case it a appear that's not declared
*** Settings ***
Library UdsServices
Variables ../python_files/Input_variables.py
#Variables C:/Users/sghribi/eclipse-workspace/robot_UCM-NANO/Ressources/python_files/Input_variables.py
*** Keywords ***
Configure Input Channel
[Arguments] @{Framedatas}
Routine Control ${CIC_Routine_ID} ${Framedatas}
Routine control function is declared in UdsServices file in a class with the same name as file
def routine_control(self, RoutineID, datas=None):
global result
response = None
data = bytes([int(x, 16) for x in datas.split(" ")]) if datas else None
with Client(connexion, request_timeout=3) as client:
try:
response = client.routine_control(routine_id=int(RoutineID, 16), control_type=0x01, data=data)
result = response.data[3:]
except NegativeResponseException as e:
print(response.data)
print('Server refused our request for service %s with code "%s" (0x%02x)' % (
e.response.service.get_name(), e.response.code_name, e.response.code))
except InvalidResponseException as e:
print('Server sent an invalid payload : %s' % e.response.original_payload)
return result
I am using eclipse and red and I added the libraries in the red.xml file .