Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Labels and other objects w/ descriptive programming
#1
Not Solved
Hi there,

Let me give you some background about my application first.

I have a web application that is almost 80% customizable, in other words, all forms vary from page to page and every time there is a possibly the forms change (may have more fields or less, or more required fields or less, etc.).

As a matter of fact if you record a script, it will work only one time as the field names will be changing from one run to the other, therefore my approach was to use only descriptive programming for all the scripts (actions).

This worked for many of the modules but for many others it didn't, so I have some questions:

1. In some pages I have over a thousand controls....so reading reading them and verifying which one I needed didn't work very well. For those I use something similar to:

Code:
Set oDescription = Description.Create()
    oDescription("micclass").Value = micClass
    Set oObject = oBrowser.ChildObjects(oDescription)
    For iCounter = 0 To oObject .Count  - 1
     If oObject(iCounter).GetROProperty("name"))) = sDTControlName Then
       oObject (iCounter).Set(sDTControlValue)
     End If
    Next

So it works cool for many forms, but for those with a lot of objects....it takes years....So the question here.....do you think this is a good approach? Do you have any suggestion for me here?

2. In other cases when creating the array of objects:

Code:
Set oDescription = Description.Create()
    oDescription("micclass").Value = micClass
    Set oObject = oBrowser.ChildObjects(oDescription)

Internet Explorer (7) crashes..... it is IE the one that crashes....but I am sure because of what I am doing in QTP. Now this is only for the highly customized forms.....for the other it always works fine. Do you think I have some sort of process overload or memory leak or something like that?

3. My forms have tables embedded in more tables and so on...so I don't know if there any way to read labels..... for example I would like to read the ID of the form, but when I try to recognize it.....it comes as webelement and I cannot figure it out how to identify it..... if I use a property, such as "innertext".... there will be other webelements without that property or with the property set to null, so the script crashes as the property does not exist or is not supported, how can I read labels?.....using webtables didn't work.....unless I have to get the entire html code and parse for the values...but that's too much no?

4. Lastly... what about the tables.....how can you read a table that does not have a name (property)?.....and once you have, how you manipulate where you are (cell) and what you have (cell content).....could you provide me some guidance?.... I have tried for many days and just can;t make it work....or perhaps I am using the wrong approach.


Thanks for your help, understanding and patience.

Regards,

Juan Luna
Reply


Messages In This Thread
Labels and other objects w/ descriptive programming - by jjluna - 01-20-2011, 09:42 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Dynamic descriptive Programming issue in Terminal Emulator cprasad 1 1,755 04-25-2019, 08:17 PM
Last Post: Ankur
  UFT Tool support with Descriptive programming laks 1 1,639 07-05-2018, 05:31 PM
Last Post: Ankur
  UFT Descriptive Programming objects not identified in a secure & private intranet env bugfinder2 1 1,671 06-07-2017, 01:41 PM
Last Post: Ankur
  UFT descriptive programming Browser("creationtime:=-1") not always working SOUMYADEEP 0 2,897 01-20-2017, 01:53 AM
Last Post: SOUMYADEEP
  Inserting variable values into Descriptive Programming Functions eske99 2 3,156 12-18-2015, 01:47 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)