Roman,

Good to see that the discussion going healthy by sharing knowledge....
As you have mentioned correctly that using the OR depends on the
application. Yes that has been exactly right.

The function could be copied to other application, by which i mean the
following:

Function Clickobj(row_no, dataSheet, stepSheet)
      The row_no-> belongs to the current row in dataSheet, which has the
following properties of Browser keyword, page keyword. Using these two keys
i use another excel file to capture the mandatory properties (properties
that could identify the browser or page). Then the row_no also gives the
"object" on which i would click on. The object type like Link or WebButton
or Image, their "html tag", "object index", "object name"....etc
So with this i made a function that could click on the object and using a
"select" function for different objects.

I hope this framework would not mess up things. But i could assure myself on
it.
However i would like to make my scritps work faster.
Since i'm passing the properties of the browser and pages in an excel file
it takes time if the browser properties are at the end of file.
the excel file will be like

Brs_main_page     <obj title>    <obj name>    <obj url>
page_main_page   <obj title>    <obj name>    <obj url>
 Brs_Login_entry     <obj title>    <obj name>    <obj url>
page_Login_entry   <obj title>    <obj name>    <obj url>
 Brs_Welcome_Scr     <obj title>    <obj name>    <obj url>
page_Welcome_Scr   <obj title>    <obj name>    <obj url>

The list goes on and on.... for all the browsers i have in my application.
When the datatables hit about 40-50 rows i could see some delay as every
time QTP has to go through this file to get the properties of the objects.

what i did yesterday was, shuffled the sheet (which has the properties of
the objects) with the objects. I changed the first few rows with the objects
that were frequently used and the other screens that are less used  (login
screen) to the end. For a scenario which took long time has reduced its time
by 50%.

Considering this time factor i thought of using this in some other form of
repository. I'm actually trying to reduce the time consumption so that i
could increase the script time execution.

Regards,
Swami

On Fri, Jan 23, 2009 at 7:25 PM, Roman Zilber <[email protected]> wrote:

> There is easy way to handle different titles in the browser without DP,
> there are actually more then one way to do it.
> Also you can't write one function for different applications, at least, I
> don't know about the way to do it. You may have different versions of the
> same application, or different copies of the application. There is no
> problem to copy OR in the same way as you copy function libraries, if you
> use global OR.
> Again it is your project, do want you think is right. I only want you to
> think if it is a best way. I've seen many homemade framework which become
> nightmare to modify and maintain, when new version of AUT comes and you need
> to update the scripts.
> There are build in features in QTP, it should be a good reason not to use
> it.
>
> Let's try to figure out what you and I mean.
> What is an interface for the functions:
> - function "that does the operation of clicking on any object", is it
> something like
> Function MyClickOnObject(ByRef oPage, sObjName, sObjValue)
> - function "parameterized the browser name"
> Function GetBrowser(sBrowserName) ==> reference to Browser() object
> - function "parameterized the page name and page url"
> Function GetBrowser(sPageName, sPageURL) ==> ref to Page() object
> , it is that?
>
>
> On Fri, Jan 23, 2009 at 12:09 PM, alll fun <[email protected]> wrote:
>
>> Hi Roman,
>>
>> You got me wrong. I want the scripts to be dynamic in the sense, i have my
>> functions and scripts written with DP so that i can copy the scripts to a
>> newer application and help them out. If two guys are approaching me (in
>> case) to automate their application, I need not be writing functions or
>> scripts for each of them. since I have one function that does the operation
>> of clicking on any object, with the (objects) name i give. I have also
>> parameterized the browser name, title, page name and page url. So now the
>> clicking on the objects gets dynamic. This can be used across any
>> application that needs an automation.
>>
>> The function itself is dynamic. Its not the object being dynamic at run
>> time.
>>
>> Hope i have clarified a bit. Let me know if i have made you to
>> misunderstand.
>>
>>
>>
>> On Fri, Jan 23, 2009 at 1:58 PM, Roman Zilber <[email protected]> wrote:
>>
>>> Hi Swaminathan,
>>>
>>> How hard is to load object repository, and why it does your functions not
>>> reusable?
>>>
>>> There is no difference where and which format the object attributes
>>> written: it can be binary OR, Excel table, VBScript code or XML. It is only
>>> different way to store the same information.
>>> But it isn't exactly true to say, that there is no difference. If an
>>> object attributes are changing in runtime, it is different. Often we can
>>> handle dynamic changes by using regular expression, but sometimes RE doesn't
>>> help. Here is an example:
>>>
>>> Static Object Description:
>>>
>>>         Set oDesc = Description.Create()
>>>         oDesc("html tag").Value = "IMG"
>>>         oDesc("image type").Value = "Plain Image"
>>>         oDesc("html id").Value =
>>> "cal.*BOseries::Calendar::.*::on_sale::0"
>>>         oDesc("micclass").Value = "Image"
>>>         oDesc("file name").Value = "cal.gif"
>>>
>>> Dynamic Object Description:
>>>
>>>         Set oDesc = Description.Create()
>>>         oDesc("html tag").Value = "IMG"
>>>         oDesc("image type").Value = "Plain Image"
>>>         oDesc("html id").Value =
>>> "cal.*BOseries::Calendar::.*::on_sale::0"
>>>         oDesc("micclass").Value = "Image"
>>>         oDesc("file name").Value = "cal.gif"
>>> *        oDesc("index").Value = ActualIndex*
>>>
>>> (* I have many such objects if user clicks "Add Element" button*)
>>>
>>> In first case it can be saved in OR and be used by its logical name. It
>>> will work within any function, in the second case the object can't be saved
>>> in OR, so we have to use descriptive programming. In general, it's better to
>>> use OR when it possible, it follows basic programming principles of data
>>> encapsulation and modularity.
>>> http://en.wikipedia.org/wiki/Information_hiding
>>> http://en.wikipedia.org/wiki/Modularity_(programming)<http://en.wikipedia.org/wiki/Modularity_%28programming%29>
>>> In addition to it you save extra time by recording objects, by the end we
>>> are working with automation tool, which should save our time. If I need
>>> manipulation on all objects in OR, I export OR to XML, change it in text
>>> editor and export it back to OR.
>>>
>>> I don't believe, you have 100% dynamic application.
>>>
>>> Roman
>>>
>>>
>>>
>>> On Fri, Jan 23, 2009 at 9:00 AM, alll fun <[email protected]> wrote:
>>>
>>>> Roman,
>>>>
>>>> The main idea of using the scripts without OR is to have my scripts
>>>> dynamic.
>>>> If i want to automate any other project I can just copy paste the common
>>>> functions and finish the scripts just like that. This would save about 70%
>>>> of the scripting time (considering that no new functions are required).
>>>> So just in case thought of considering the xML repository. However I'm
>>>> not sure whether XML repos. would help my scripts or not.
>>>>
>>>>   On Thu, Jan 22, 2009 at 7:16 PM, Roman Zilber <[email protected]>wrote:
>>>>
>>>>> Why you don't want to use regular object repository? I have application
>>>>> with 500 screens, and it works fine except some dynamic objects.
>>>>>
>>>>>
>>>>> On Thu, Jan 22, 2009 at 3:04 PM, alll fun <[email protected]> wrote:
>>>>>
>>>>>> Hi Everybody,
>>>>>>
>>>>>> Being a mute spectator of the group, I would like to ask a question
>>>>>> from my part too about repositories in QTP.
>>>>>> I have my own framework (though its simple) without the usage of
>>>>>> object repository and using the Description.Create method to capture the
>>>>>> objects with its unique properties.
>>>>>> The object properties has been parameterized throughout.... Since the
>>>>>> application has about 25 different screens (every navigation is treated
>>>>>> with different name by the developer :( ) the parameterization through
>>>>>> Datatable is bit slow at times. Some one was saying to look at the XML
>>>>>> repository method.
>>>>>>
>>>>>> Have anybody used such repository type? How far it is helpful in
>>>>>> "Description.Create" kind of programming. I googled for this but results 
>>>>>> did
>>>>>> not make me happy.
>>>>>> Any help on this is highly appreciated.
>>>>>>
>>>>>> --
>>>>>> With Cheers and smiles...
>>>>>> Swaminathan.S.P
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>>
>>
>> --
>> With Cheers and smiles...
>> Swaminathan.S.P
>>
>>
>>
>
> >
>


-- 
With Cheers and smiles...
Swaminathan.S.P

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to