Forum Discussion
If you use the Object Browser (not Object Spy), is there any indication as to when the child object is created?
Are you able to post a picture of the Object Browser, before and after object is created (similar to my example)?
I am posting a screenshot of the Object Browser, the highlighted object is what I am trying to click:
This object is always visible physically, as you can see in the screenshot the object is visible but still the Height and Width is 0. I am also including the screenshot of the object browser after restarting the application, where Height and Width is not 0 and I am able to click the object:
- Hassan_Ballan4 months ago
Champion Level 3
Notice also the ControlIndex and ControlIndexGroup are "-1". It looks like the UI element is being destroyed and never properly recreated, or Memory corruption or rendering issues.
What happens when you try code refresh, or Object Browser panel GUI refresh
Sys.Refresh(); // Refresh process list Sys.Process("MyApp").Refresh(); // Refresh UI tree inside app- hina4 months agoContributor
I tried using Sys.Process("AXISEL").Refresh(); in my code, in my first attempt when I run the test case I get the same error as I reported. I tried putting a Delay upto 25000 milliseconds but no luck. In my second attempt it always work, not sure about this behavior.
- Hassan_Ballan4 months ago
Champion Level 3
That is interesting, let's recap the problem:
✅ The application is running and responsive.
✅ The test successfully interacts with the same item multiple times.
❌ Eventually, error "There was an attempt to perform an action on a zero-sized window".
❌ Calling .Refresh() on the process/UI object on the first retry does not fix it,
✅ but does fix it on the second attempt.Now that you have a work around by refreshing twice, lets also consider refreshing the object cache https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/refreshmappinginfo-method.html
The RefreshMappingInfo method clears the cached object reference and searches for the object again. You may need to use this method:
- if the object’s identification properties were changed,
- if the object was recreated in the application,
- if another object matches the mapping criteria,
- before checking if the object exists.
- rraghvani4 months ago
Champion Level 3
Are you able to include the before and after screenshots of the UI as well, together with the Object Browser?
In the Object Browser, if you click "View more members (Advanced view), you will get more properties and methods exposed. There may be other properties/methods that will give you an indication as to when the UI can be interacted with. Also, ask your Developers, they may be able to help too.
- hina4 months agoContributor
Hi rraghvani,
I am posting the screenshot of the UI, the object "TestComplete Work Area 1" is always visible, so there's no change in UI when the height and width is 0 vs when it's not 0.
- rraghvani4 months ago
Champion Level 3
I was hoping, if possible, to see something like this -
Showing the Object Browser, Properties and the UI Control in question.Are you able to find out, what the exact control name is being used in your AUT, or is it a custom control?
What methods are shown for item "TestComplete Work Area 1"?
You are using the Click method, are you passing in any parameters?
Can you enable Advanced View.