Forum Discussion
4 Replies
Sort By
- TanyaYatskovskaSmartBear Alumni (Retired)
Hi Joachim,
The WaitProperty method isn't suitable for this task. You need to use another Wait* method - it depends on the type of your app - WaitWinFormsObject, WaitCLXObject, WaitJavaFXObject, etc. Refer to the "Waiting for an Object, Process or Window Activation" article for examples. - jscRegular ContributorHi Tanya,
i tried different ways, but neither was satisfying.
The best until now was like this:
var DBFieldExists = false;
var i = 1000;
while ((DBFieldExists == false) && (i>0))
{
if (Aliases.FContainerFormLogin.TWCAxSession.PanelBody.cbDatabaseInstance.Exists == true)
DBFieldExists = true;
i--;
delay(500, "waiting until database field exists...");
}
When I run this with TestExecute I get an error posted to the log for every loop if "Aliases.FContainerFormLogin.TWCAxSession.PanelBody.cbDatabaseInstance.Exists == true" fails!
I think it is wrong to write an error to the log when I am checking if the object exists and it does not exist.
What can I do?
Joachim - TanyaYatskovskaSmartBear Alumni (Retired)
Hi Joachim,
As you are using Name Mapping in your test, you need to use the WaitAliasChild method to get the object that is appearing when executing a test. Here is the example:
if (Aliases.FContainerFormLogin.TWCAxSession.PanelBody.WaitAliasChild("cbDatabaseInstance", 3000).Exists)
{
//the cbDatabaseInstance object is available for testing
}
- jscRegular ContributorThanks a lot.
I got another solution but this was not as good as yours!
Related Content
- 11 years ago
- 5 years ago