Forum Discussion
I think I'm using Keyword tests at least that's the folder my test is saved under.
When the test fails it stops running and I get an error message saying "There was an attempt to perform an action on a zero-size window"
- Marsha_R10 years ago
Champion Level 3
Could we see your code, showing the drop down that works and the one that doesn't?
- tristaanogre10 years agoEsteemed Contributor
That definitely sounds like a timing issue. You're trying to interact with a component that sounds like it's in the middle of a refresh or resize process triggered by your selection on the first component.
In this case, I don't think the standard "trick" of using custom time outs or WaitNNN methods will work. You may need to use some more deliberate checking, adding some sort of "while" loop to wait until the property of the drop down in question meets the requirements. Something likewhile (MyObject.Width < 1) { Delay(1000); }It's kind of rough and dirty... better code would add an escape clause to kill out of the loop if a counter increases beyond a certain amount. But, essentially, after you execute your first drop down, you need to wait a period of time before you attempt to interact with your second one. There are quite a few ways to implement this, mine is just one example.