TestProject Forum

Performing a step after an element appears

Hey! Help a newbie please. How to wait for the element to appear and after its appearance to take the next step? Or, after the element appears, go to the desired step backward or forward.

Hello @zeleznov.sergey
By default, recorded tests use a component called Adaptive wait, which means before deciding if an element is not interactable(not visible, hidden, and so on…) it will wait for that set amount.
By default, the adaptive wait is set for 15 seconds for all steps.

So if you recorded your test, clicked on Button A, then clicked on Button B while button B can take, for this example, 10 seconds to load, it will wait for that button to load(as it was loaded under the 15 seconds timneout)

You can change the adaptive wait per step:
image

image

Or per test:
image

You also have actions that have an (if visible) postfix which indicates this action will perform only if the element is visible.

Thanks for the quick response
I need to scroll the screen so that the element becomes visible, but while the screen is loading, the scroll is not executed and the required element does not appear for the next step

Hi @zeleznov.sergey,

You can use the JS Actions addon for that:

After the addon installation simply hover over the element you are looking for and create Scroll To Element With Javascript action:

The adaptive wait time that Ran mentioned above will handle the loading time.

1 Like

Tremendous thanks, this is what I need