Simple function call does not work in Robot Framework

I am new to Robot FW and I am in the training phase. To try to access external libraries, I made a very simple function and saved the file tryingLibrary.py. Content:

def myAdding(x, y):
    z = x + y
    return z

Then i will worte the next 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 expect, of course, 56not3026

So where could the problem be?

+4
source share
1 answer

You might want to see this documentation.

, Unicode. .

  • python,

    def myAdding(x, y):
         z = int(x) + int(y)
         return z
    
  • : doc

     *** Test Cases ***
     TestTest
          ${x}=  myAdding     ${30}      ${26}
    
+5

All Articles