01-20-2011, 09:42 AM
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:
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:
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
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