Reputation: 48
I am getting error "No keyword with name 'addition' found."
py file
class A:
def addition(self,a,b):
print(a+b)
obj=A()
obj.addition(4,5)
robot code
*** Setting ***
Library xyz.py
*** Test Cases ***
Addition Program
addition a b
Upvotes: 1
Views: 3567
Reputation: 1242
Make sure to follow the documentation to RF .
Taken from the documentation:
Python file "MyLibrary.py"
class MyLibrary:
def __init__(self,a,b):
self.a=a
self.b=b
def addition(self):
return self.a+self.b
robot file
*** Settings ***
Library MyLibrary.py ${2} ${1}
*** Test Cases ***
Example
${result}= MyLibrary.addition
Log ${result}
Upvotes: 2