Ask a Question

Attempt to perform an action on a zero-sized window

Frequent Contributor

Attempt to perform an action on a zero-sized window



I'm having some difficulty in getting a keyword test to interact with a menu item in a web page.


I'm trying to click the object to Logout of the application at the end of a test but it's not able to be found. Yet, it's visible when the test is running, there are no windows overlapping etc and it isn't inside a sub menu of any kind. I've run through this page to try and isolate a cause but none found :


I've tried numerous ways to get this to work including, re-recording the click action, adding a checkpoint in before hand on the object (this has worked for me prev), I've also tried using different operations like Call Object Method & If Object but I'm out of ideas.


Additional info from the log is here:


The window size is (0, 0); the screen rectangle: the left top corner is (0, 66), the right bottom corner is (0, 66).


Tested object:



Any help would be really appreciated.




Frequent Contributor

See if this helps.

The topic that @dmiscannon linked in is your best bet.  I frequently get that in my log files for tests where I attempt to click on something before it is ready to be clicked on. One of our web applications doesn't actually "destroy" modal forms when they go away, it simply sets the height and width to zero.  So, the form is always present and "Exists" is always true.  It is, also, technically always visible.  So, when we want to detect if the form is on screen, we check the "Width" property.  If it is greater than zero, we then can act against it.  We use the "WaitProperty" method in a loop.  While Width is zero, we keep looping until either the width changes or we hit a maximum time out.  You might want to consider implementing something like that.

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
Showing results for 
Search instead for 
Did you mean: