Waiting for Button to be enabled
Hello. I am new to TestComplete and would like to ask if someone can help.
I need to wait for this button to becomes enable so I can move on, the enabled time varies on the button but no longer than 30 seconds. I prefer not to use the Delay command because the script will take too long to complete.
I am trying to use the following script in my keyword but it is giving me a code error within the script. "TypeError::WaitProperty is not a function. " It must be something silly but because I am new to this I do not know where to start.
function WaitForButton() {
var button = Aliases.browser.pageExam.buttonOn.Enabled
if (button.WaitProperty("Enabled", true, 35000))
{
button.ClickButton();
}
}
That almost looks right, you just need to set "button" to the button object (not its "Enabled" property):
var button = Aliases.browser.pageExam.buttonOn;