I'm new to Robot FW and I'm in the learning stage. In order to try calling external libraries, I made a very simple function and saved in tryingLibrary.py file. The content:
def myAdding(x, y):
z = x + y
return z
Then I worte the following RF test
*** Settings ***
Documentation Suite description
Library tryingLibrary.py
*** Variables ***
${x}
*** Test Cases ***
TestTest
${x}= myAdding 30 26
However, when I check the log file, I find ${x} = 3026. I mean I'm expecting of course 56 not 3026
So where might be the problem?
"30"+"26"="3026"z = int(x) + int(y)in thedef myAdding(x, y):Robot f/w by default takes Unicode String as argument. You will have to explicitly convert it tointor the type you may want to use.