cancel
Showing results for 
Search instead for 
Did you mean: 

Error message "There was an attempt to perform an action on a zero-sized window"

Highlighted
Occasional Contributor

Error message "There was an attempt to perform an action on a zero-sized window"

I have recorded keyword test  when i run that i got error message "There was an attempt to perform an action on a zero-sized window".

1 REPLY
Community Hero

Re: Error message "There was an attempt to perform an action on a zero-sized window"

What that means is that, for some reason, your test is acting against an object on screen that has a zero height and width.  Most likely, this is a timing issue.  I'm guessing your test goes something like this.

 

1) Click a button or link that brings up some other modal or causes some component to become visible

2) Click on a button or link within that subsequent component.

 

However, between 1 and 2, there's a timing delay... some sort of processing, page load, etc., occurs so that the modal or component is not IMMEDIATELY available.  One thing to keep in mind, especially when recording, is that as you are recording you're taking into consideration visual queues that you, as a human, know signal when something can be acted against.  TestComplete is "dumb" in that respect in that, unless you explicitly tell it not to, it will attempt to run as quickly as possible.  This means it may attempt to act on an object that is not ready to be acted upon.

 

This is where you need to do detection code in your keyword test to make sure that components are ready to be acted on before you do so.


Robert Martin
[Community Expert Group]
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.


I’ll be talking about “Hidden Treasures – TestComplete Script Extensions” at #SBConnect in October! Who’s joining me? Click here for tickets
Extensions available
Watch a new Video
Top Kudoed Authors