06-10-2008, 05:13 AM
Yes, I did. It shows only the two objects that are indicated in the code example I've provided in my original post: SwfWindow: Report > SwfObject:SwfObject, which is the same as what displays if the Print button/icon is spied on using the .Net Windows Form Spy.
The normal Object Spy reveals a more detailed hierarchy: SwfWindow: Report > SwfObject: ReportUserControl > SwfObject:CrystalReportViewer > SwfObject: ToolBar > SwfObject: SwfObject. I tried adding the additional objects via the Define New Test Object option in the Object Repository, but that didn't help either.
The only thing that has seemed to help is to click on another button/icon on the Crystal Report and then click on the Print button/icon, but QTP is still not consistently clicking both buttons/icons.
It might also be a timing issue as I added a Wait before clicking the buttons/icons to give the report time to load and it has helped somewhat, but the button/icon click events are still not occurring consistently. Thank you!
The normal Object Spy reveals a more detailed hierarchy: SwfWindow: Report > SwfObject: ReportUserControl > SwfObject:CrystalReportViewer > SwfObject: ToolBar > SwfObject: SwfObject. I tried adding the additional objects via the Define New Test Object option in the Object Repository, but that didn't help either.
The only thing that has seemed to help is to click on another button/icon on the Crystal Report and then click on the Print button/icon, but QTP is still not consistently clicking both buttons/icons.
It might also be a timing issue as I added a Wait before clicking the buttons/icons to give the report time to load and it has helped somewhat, but the button/icon click events are still not occurring consistently. Thank you!