I'm trying to figure out what am I doing wrong, I want to get the result of a specific python function.
This is my Resources.robot file:
*** Settings ***
Library resources_func.py
*** Keywords ***
Test Time
${time_delta}= get time period ${Time}
- ${Time} is defined but isn't relevant to my question
and this is my python script:
import re
from dateutil.parser import parse
class TimeTests(object):
def get_time_period(timestamp):
timestamps = re.findall(r'[0-9][0-9]:[0-9][0-9]', timestamp)
a = parse(timestamp[0])
b = parse(timestamp[1])
res = (b - a)
res = res.seconds / 60
return res
This is the error I'm getting:
No keyword with name 'get time period' found.
Any ideas?