joe_2
11 years agoContributor
Anyone know why the name of an object might be different one time?
Most of my tests rely heavily on the FindChild function. When I can, I use button text, or other properties to find by, but often I'm reduced to using the object's name.
Recently I've run into errors in which the name of an object will be different than it has been before.
I'm talking about stuff like a window that's normally named
'WinFormsObject("AcquireXray")'
suddenly changing to
'Window("WindowsForms10.Window.8.app.0.2bf8098_r13_ad1", "", 1)'
in mid-test-run.
The test is repeatedly opening and closing the relevant forms.
It's right, and then suddenly it's wrong and the test can't find the required object, because the form it's supposed to be a child of doesn't exist.
Also, when I do search by ButtonText, this no longer works with the 'renamed' form, because a winformsobject button has a ButtonText field, but a Window(<whatever>) object does not.
Anyone know why I might suddenly be seeing this?
Is it a problem with TestComplete's routines that map objects for the object browser, or is it more likely to be a problem with the latest iteration of my program failing to name stuff correctly? I'm at a loss.
Oh.. I'm running TC10 with a test suite that was started under 9 and then updated when 10 came out, in case that's relevant.
Recently I've run into errors in which the name of an object will be different than it has been before.
I'm talking about stuff like a window that's normally named
'WinFormsObject("AcquireXray")'
suddenly changing to
'Window("WindowsForms10.Window.8.app.0.2bf8098_r13_ad1", "", 1)'
in mid-test-run.
The test is repeatedly opening and closing the relevant forms.
It's right, and then suddenly it's wrong and the test can't find the required object, because the form it's supposed to be a child of doesn't exist.
Also, when I do search by ButtonText, this no longer works with the 'renamed' form, because a winformsobject button has a ButtonText field, but a Window(<whatever>) object does not.
Anyone know why I might suddenly be seeing this?
Is it a problem with TestComplete's routines that map objects for the object browser, or is it more likely to be a problem with the latest iteration of my program failing to name stuff correctly? I'm at a loss.
Oh.. I'm running TC10 with a test suite that was started under 9 and then updated when 10 came out, in case that's relevant.
Finally figured out what was going on with this.
The application under test was dynamically building a right click menu with items present in a particular folder.
It was not supposed to be leaving anything in that folder for more than 30 days... and it had not cleared the folder in over a year.
Instead of ten or twenty items, there were several hundred, and the routine to build the menu was taking a long time.
This delay eventually exceeded the wait times set in TestComplete, and started affecting performance.
The path to this bug was indirect and somewhat misleading, but TestComplete did eventually lead me to it.