Forum Discussion

zgibanez's avatar
zgibanez
Occasional Contributor
12 months ago

Equivalent to WaitAliasChild in keyword tests?

As the title says, is there any operation equivalent to the `WaitAliasChild` function in TestComplete?

 

The problem I am facing is the following: I am testing a WPF interactive application. While playing back tests, TestComplete does not hold on until UI elements are available to click/interact with them. `WaitAliasChild` allows to do this on script tests, but not on keyword tests.

 

I am in the process of training our QA team and I wanted keyword tests to be the first step before diving into scripting.

 

Any ideas? Cheers!

5 Replies

  • sannydeol's avatar
    sannydeol
    Occasional Visitor

    Hi there! Unfortunately, TestComplete does not have an exact equivalent to the `WaitAliasChild` function in keyword tests. In keyword tests, you can use the "Wait" operation to pause the test execution for a specified amount of time, but it may not be ideal for waiting until UI elements are available. It seems like scripting may be the way to go for your specific requirement. However, if you still prefer to stick with keyword tests, you can consider using the "Region Check" operation to wait for a specific region of the screen to become visible before proceeding with the test. Hope this helps! Cheers!

  • Have you looked at the Project's playback properties? Perhaps your auto-wait timeout is not long enough?

     

     

    • zgibanez's avatar
      zgibanez
      Occasional Contributor

      I know about the timeout setting. In our case, the loading times span from 5 seconds to 10 minutes depending on the actions on the software, so ideally I would like to have a custom wait time for each action or each kind of action.

      • sgoulet's avatar
        sgoulet
        Contributor

        Woa. That's long. What I might do is write a script which takes the needed parameters and call that script as needed in the keyword tests.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    In this WPF example, I am using a keyword operation WaitAliasChild, to wait for "Button" to appear within 5 seconds.

    Take note, the alias tree structure Grid -> Button | Button2 | ListBox. Button is beneath Grid, hence child alias.