Suppose I have a class in python:
class TestClass(object): def __init__(self, arg1, arg2): self.arg1 = arg1 self.arg2 = arg2 def print_args(self): print arg1, arg2
I want to use robotframework to implement my test scripts. I want to make an instance from the class above and call its methods. How to do it? I know how to import lib; it should be like this:
Library TestClass
I do not know how to initialize an object from this class and call class methods through this object. If I wanted to implement it with python, I would write a piece of code like this:
import TestClass test = TestClass('ARG1', 'ARG2') test.print_args()
Now I want to know how to write this in a robotframework . Any help?
python testing robotframework
Zeinab Abbasimazar
source share