Hi, I'm evaluating QTP at the moment to see if this is the right tool for our team.
I came across something that bothers me a bit and wanted to know if anybody could help me:
I understand that you can only use the objects from OR with Actions, basicly you cannot make use of OR when
creating functions in an external file because if the OR changes, the change will not be reflected in your function?
What i would d like to know:
1. has someone find a way to implement a proper keyword driven framework(functions from external file are called using keywords)while also using objects from Object Repository to maintain the diferent Test Objects used in the functions
if so do you have an example, code, solution?
2.Has someone tried to generate DP code from OR at runtime using something like:
a. Load all Test Objects from your OR using:
GetAllObjects(), GetChildren(), for each object get all properties(name,value)
b.Generate DP code using info from above and Set obj_Desc = Description.Create etc to create objects
C. use this DP code in your function in external file.
So that when you run your test, the first thing you do is get all up to date objects from your OR and use them
in your functions, the benefits will be:
- You still have a nice interface to update all your objects...OR
- Whenever there is a change, this will be reflected in your code.
Re: Object Repository in a Keyword Driven Framework
Thanks for your reply.
I dont use keyword view but want to use a keyword driven framework.
So in theory, if i configure the logical name in the way i want it in the OR and never change it, i should be ok to use same code in external functions, even if the object has changed ovetime(not the logical name)...that's great.