I am a new user to QTP and I am using QTP 8.2. I am trying to script an application based on Sage CRM technology and I am facing a strange problem with the object recognition.
The functionality to be tested is whether a particular address can be modified.I have four fields to be modified which contain the address.However, during recording the object is recognised by the object name same as the content of the field. For example if I have "door number 12" as the content of the first field which I need to modify to "door number 14".During recording the object name is captured as "door number 12".Now during the replay if the contents of the field are "door number 15" the script fails as the object "door number 12" is not present.
I have tried using description object and I have given something similar to
Set oEdit = Description.Create()
oEdit("text").Value = "door number 12"
I am not very sure if this would work as here too I am using "door number 12" which is dynamic. Is there some wild character( like * in C) so that i can give something similar to "door number *" for the value. I have close to 30 objects being recognised this way and I need a solution to this badly.
Has anyone encountered such a thing before? Please let me know of any alternative
Re: Object names are same as the text in the objec
It did work and I managed to do it for 3 objects. Now I have a new problem.There is a field(City) where the data can be either "Bangalore" or "Chennai".
I am using WinObject("regexpwndtitle:=[Bangalore]|[Chennai]") but this is not working.Is there something wrong with the syntax or is this the wrong way of using this condition?