jeudi 10 mai 2018

Want to implement Reflection method to retrieve class objects in page object using page factory framework

So i am using a page object model using page factory. I have separate classes for each pages of application like Homepage,Registration etc and i make an object of each class in the test script class whichever i am scripting to call inherited method. Now i want to implement a common class like pagefactory which can return me the methods of each page object classes and in test case i just make object of class page factory which can return me all the methods from registration,login,homepage etc etc.It will save me to create separate page objects of multiple page object classes. I know this is possible with reflection method however i am not getting a correct way to use it as i am not using any keyword driven framework.Kindly advice how can i tackle this problem. If possible please send a code. I am looking something like my driver is in testbase class, test script is in TC001,page objects are under registration and login class and i want to create a page factory class which calls all the methods of all the page objects of the application.





Aucun commentaire:

Enregistrer un commentaire