Data Driven Framework | Selenium Python Forum
D
Davesh Posted on 03/01/2021

Data Driven Framework - Out of GenericKeywords, ValidateKeywords and ApplicationKeywords, which of the classes are parent and which ones are child. On seeing the framework, it seems GenericKeywords class is used as Child class but in that case we can't call the functions of GengericKeywords from Application Keywords. So, actually ApplicationKeywords class should be the parent class. Please suggest?, OR,

If we are able to call functions of GenericKeywords class (child) from ApplicationKeywords class (parent), then please explain how?


0
09914040666 Replied on 04/01/2021

Hey, 

It is not a hard rule to make application keywords the parent class or generic keywords the parent class. It is upto you which class is the most required and is going to have functions which are directly being used by test case. You just have to use concept of inheritance in the classes. If you want to use functions from generic keywords that yuo can make application keyword child class. Make generic keyword the parent class, then object of application keyword will be made in the conftest.py