Forum Discussion
akash_pancholi
14 years agoOccasional Contributor
''What other criteria do you use in your name mapping for this object? Is the only thing you're using the #32770 class? If so, then I'm not surprised as there are many other objects, items, etc., that may appear with that same class.'' I use two - objecttype=dialog and wndclass=#32770, actually parent of 'Report' has only 1 child, so it doesn't actually matter. And, I check Exists and Visible property of 'Report' before searching its children. This is in MFC desktop application.
"Where error shows up in your test log on this? There's an additional information panel in your test log which may give additional information" - log posts no error, do search operations not trigger logging? Is there any way to turn on the level of logging? By the way, I'm on version 7.52.
"I would not use MappedName in a FindChild call at all because MappedName is first of all depending upon the object being recognized as being mapped in NameMapping. If you're already having trouble with WaitNamedChild, MappedName will almost certainly fail. Again, I think the root cause of the problem is not with the Print button itself, but something in how you're mapping to the Report object is handled." - That's what I expected, but actually FindChild successfully finds it.
"Now, another possibility is that this call to find the print button is probably occurring after some sort of test step that generates the report in the first place. So, there is probably a delay between clicking the button to generate the report and when the report appears on screen. I would suggest going further up in your code and getting your actual Report object using a WaitChild or WaitNamedChild or something and using a delay parameter of something significantly greater than 0 (like 60000)" - This was my first guess, so after FindChild successfully found it, I called WaitNamedChild again, unfortunately, it still failed.
Also, as I mentioned in previous post, this actually works fine when in TestComplete script, it's only when I make the call via connected app, which suggests there is a bug with WaitNamedChild, possibly in how string parameter from connected app is handled. Attached please find screenshots of the hierarchy.
Appreciate your input.
Thanks,
Akash
"Where error shows up in your test log on this? There's an additional information panel in your test log which may give additional information" - log posts no error, do search operations not trigger logging? Is there any way to turn on the level of logging? By the way, I'm on version 7.52.
"I would not use MappedName in a FindChild call at all because MappedName is first of all depending upon the object being recognized as being mapped in NameMapping. If you're already having trouble with WaitNamedChild, MappedName will almost certainly fail. Again, I think the root cause of the problem is not with the Print button itself, but something in how you're mapping to the Report object is handled." - That's what I expected, but actually FindChild successfully finds it.
"Now, another possibility is that this call to find the print button is probably occurring after some sort of test step that generates the report in the first place. So, there is probably a delay between clicking the button to generate the report and when the report appears on screen. I would suggest going further up in your code and getting your actual Report object using a WaitChild or WaitNamedChild or something and using a delay parameter of something significantly greater than 0 (like 60000)" - This was my first guess, so after FindChild successfully found it, I called WaitNamedChild again, unfortunately, it still failed.
Also, as I mentioned in previous post, this actually works fine when in TestComplete script, it's only when I make the call via connected app, which suggests there is a bug with WaitNamedChild, possibly in how string parameter from connected app is handled. Attached please find screenshots of the hierarchy.
Appreciate your input.
Thanks,
Akash
Related Content
- 10 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago