WaitProperty not detecting that property is not at expected value
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
WaitProperty not detecting that property is not at expected value
Hi all,
I have a WaitProperty step in my keyword test, I am trying to check if a button is enabled or not before the test proceeds, so have selected the button as the object and "Enabled" property as the value to check, with the Property value set to True.
Issue is that when I run the test, with the button disabled, the test does not stop on the WaitProperty operation, so appears to not be checking the Enabled status of the button. See screenshots for details
Solved! Go to Solution.
- Labels:
-
Keyword Tests
-
Web Testing
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Waitproperty will not stop the script. It will just wait either te state got changed or till the time you specified. To make the script stop you need to add if statement after this wait to read the Last operation result and see if that wait statement failed or not.
Waiting for Object State Changes | TestComplete Documentation (smartbear.com)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The PropertyName should be Enabled and not e.g. Aliases.buttonMybtn.Enabled.
For example,
function Test1()
{
Aliases.buttonMybtn.WaitProperty("Enabled", true, -1);
}
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for that, I thought that selecting the property as per my original screenshot would just select the "Enabled" property. Didn't realise that it was looking for a property named with the full alias.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, didn't realise that was the case. I thought all test steps would cause the test to stop if they couldn't be completed. Thanks.
