You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to integrate python libraries into Robot Framework #47
I have seen examples of defining functions in python and the functions are called directly from a test in Robot. What I want is to follow the page object design concept where a page for example, home page is more like a class and the services offered by this page ex., login is a method within that class. In typical programming I would have a main that would instantiate an object of this class and access the services/methods within the class. Unable to relate on how I would integrate this with Robot framework. I could have these classes within a package and import them using the "ADD Library", But how would I instantiate the objects of classes. I figure I could have a function that incorporates instantiating the objects and then associate that with the test in robot framework. Am I on the right path ? or is there a more efficient way to do this ?
Appreciate your help and sorry if this too basic a question. I did look up some blogs before posting the question here.
I have seen examples of defining functions in python and the functions are called directly from a test in Robot. What I want is to follow the page object design concept where a page for example, home page is more like a class and the services offered by this page ex., login is a method within that class. In typical programming I would have a main that would instantiate an object of this class and access the services/methods within the class. Unable to relate on how I would integrate this with Robot framework. I could have these classes within a package and import them using the "ADD Library", But how would I instantiate the objects of classes. I figure I could have a function that incorporates instantiating the objects and then associate that with the test in robot framework. Am I on the right path ? or is there a more efficient way to do this ?
Appreciate your help and sorry if this too basic a question. I did look up some blogs before posting the question here.
-Mamatha
Mamatha,
Here are a couple more examples of using page objects with robotframework
Activity
emanlove commentedon May 30, 2012
On 04/17/2012 10:42 AM, mamathanag wrote:
Mamatha,
Here are a couple more examples of using page objects with robotframework
https://github.com/adamgoucher/robotframework-pageobjects
http://www.beer30.org/?p=54
Ed
ombre42 commentedon Jan 18, 2014
Closing inactive howto issue.