suzanne_raine
11 years agoContributor
Error: The window size is (0, 0);
Hi,
When I'm getting to my line:
MyControl.Click(), I'm getting this error:
The window size is (0, 0); the screen rectangle: the left top corner is (463, 161), the right bottom corner is (463, 161).
It's in a while loop, and doesn't mind clicking the button the first time just hates it the second time.
Can anyone help?
Thanks
When I'm getting to my line:
MyControl.Click(), I'm getting this error:
The window size is (0, 0); the screen rectangle: the left top corner is (463, 161), the right bottom corner is (463, 161).
It's in a while loop, and doesn't mind clicking the button the first time just hates it the second time.
Can anyone help?
Thanks
- Hi Suzanne,
Most probably, this means that the initial button was hidden by setting its height and width to zero and a new one was created on its place. Use Object Browser in TestComplete to search for both buttons to check if this my guess is correct.
If my guess is correct, then either:
-- talk to your developers and discuss if this is an issue or they generate new buttons for purpose (third, fourth, etc. buttons will be generated on the subsequent loop cycles)
or:
-- modify your code so it within each loop iteration (for example) searches for all buttons with the given criteria using FindAllChildren() and then iterate through the returned array to search for the button with the height and width greater than zero.
Another option: if you are using NameMapping for this button, then you may enable Conditional mode for the button and, in addition to the already used recognition parameters, add the condition that the height (or width) must be greater than zero (see TestComplete's help for the Conditional mode in NameMapping).