Updated Testcomplete 12.30 to 12.50 , getting preparing an object recognition hint
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Updated Testcomplete 12.30 to 12.50 , getting preparing an object recognition hint
Hi all,
I have updated Testcomplete from 12.30 to 12.50, automated tests used to run perfectly fine but now complaining about the objects. In one of the scenarios where it clicks OK button to close the window, it is clicking the OK button and closing the window. But immediately waiting for the previously clicked button and display "Preparing an object recognition hint", any solution, please?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That hint usually occurs if there is some difficulty in identifying the object. It's possible that something may not be identified with some of the same options as under the previous version... some NameMapping changes are in 12.50. So, before we can help too much (you're the first to report this specific problem), it would be good to see
1) Screenshot of the Object Spy/Object Browser of the object in question displaying properties and hierarchy.
2) Screenshot showing the NameMapping configuration for the object you're attempting to work with.
3) Screenshot showing Keyword testing steps to be executed OR copy/paste of script code.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Robert,
Thank you for your reply, I have attached the screenshots and pasted the code.
//Click on Backup and Restore button
Aliases["PTPTaxExpenseObjectMap"]["wndTaxExpenses"]["wndTaxExpenseEmployers"]["btnBackUpRestore"]["BackpImage"]["Click"]()
var backupbtn=Aliases["PTPTaxExpenseObjectMap"]["HwndSource_Window5"]["WndBackupRestoreDatabase"]["TabControl"]
//Click on Backup radio button
backupbtn["rdoBackupTo"]["Click"]()
Delays["ExtraSmallDelay"]()
//Click on Run option
backupbtn["btnRunOption"]["Click"]()
Delays["ExtraSmallDelay"]()
//Click on OK button on backupsuccessful message
Aliases["PTPTaxExpenseObjectMap"]["HwndSource_Window6"]["WindowBackupRestore"]["btnOk"]["Click"]()
Thanks.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK... so, it clicks on the OK button... what's next in the code? Is the error actually with the OK button or is it associated with something else? Perhaps a screenshot showing the error in the log with the "Additional Info" panel information.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It clicks OK button successfully, after this again looking for this button with a message "preparing an object recognition hint" as per attachment. I have attached the logs as well, whenever I double click the log message it takes me to this code.
//Click on OK button on backupsuccessful message
Aliases["PTPTaxExpenseObjectMap"]["HwndSource_Window6"]["WindowBackupRestore"]["btnOk"]["Click"]()
Whenever Testcomplete performing "preparing an object recognition hint" it becomes unresponsive.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, there's something else going on in there... there's an "Unexpected Window" error... could be any number of things then that could be going differently. I'd resolve that error first before you start worrying about the "object recognition hint".
Basically, from your log, you're clicking on the OK on the backup restore window... but then there's something else going on where (I'm guessing) that window isn't getting closed before you attempt the next step.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, please highlight the line that has the object recognition hint and then, in the lower panel, select the "Additional Info" tab. It would be helpful to see what it thinks it is finding versus what's actually on the screen.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's generally not a good idea to map using the "Name" field. In this case, I'd actually change the mapping to use the Caption property with a value of "Backup & Restore". This is a more accurate and reliable mapping.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have already added the WndCaption to the parent window but can't find WndCaption on the second level. But there is another property called WPFControlText on the second level, would adding that the be better solution than adding Name property?
