I am having a problem with a websites dropdowns. When I change a dropdown it affects the dropdown below it. My script is trying to change the dropdown that is disabled because it is refreshing since the previous dropdown was changed. I have sync statements in my script, but that is not working. I have even tried waiters but QTP blows right through them. How do I get QTP to wait on the dropdown to become enabled?
The best way to manage the flow of your script is to insert steps that are based on a given state. Kalesh and Fredman have it right - you key on the properties of a given object, and until that property you are looking for is true, then you wait on it.
Unfortunately, the WaitProperty has a defined time to wait before it will fail if that condition doesn't occur. I prefer to use logic around that given state in an If/Else process along with a Wait(time) function. You are continually evaluating whether the property is valid and once it is valid - it continues on...i usually set the counter to a certain number of loops and if it doesn't appear in a certain time - i will fail out and either do something else, or repeat process...depends on your flow.
The TimeOut is an optional parameter. A Long value.
The time in the example is 10000 in milliseconds (which is 10 seconds), after which QuickTest continues to the next step if the specified value is not achieved. If no value is specified, QuickTest uses the time set in the Object Synchronization Timeout option in the Run tab of the Test Settings dialog box.
You could set your timeout to 60000,
which is sixty seconds. If the menu does not appear in that time, fail the test, perhaps.