RobotFramework: problems with python classes

Asked by venkatesh on 2017-09-13

getting key error :

I have 3 python classes , , - contains different region dictionaries added like below


and getter and setter method to retrieve the dictionary value

def addReg(self, name, reg):
  self.regDict[name] = reg

 def getReg(self, name):
  return self.regDict[name] - contains

reg = regionDictionary(1920,1080)
self.reg.getReg("normalScreen") i have the test cases and i ran using below suggested framework

I ran my code using ( Robot Framework

 C:\work\> jybottest.bat robot_suite\verify_operations.txt

im getting error as KeyError: 'normalScreen' in log.html

can you please help me in resolving this

when i run through jybot.test the dictionaries of the parent class will not be loaded ?

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
RaiMan (raimund-hocke) said : #1

reg = regionDictionary(1920,1080)

In your code I cannot see an init method that initializes the reg object with the given values and the key "normalScreen".

venkatesh (venkat6840) said : #2

Hi Raiman,

Mistake is from my side , i just now saw there are two classes one in

1) Folder/Folder which contains 'normalScreen' dictionary
2) Folder which doesn't contains 'normalScreen' dictionary

The code im running is from Folder /folder and my code is taking from Folder - thats where it is throwing the error

Thanks for you reply