'How to wait for angular requests to complete for automation testing

I am facing issues while automating Spartacus angular application using selenium java. Selenium is not waiting for all angular requests to complete. As the request takes a few seconds to generate, selenium thinks the page has loaded successfully. but there is still process going on in background.



Solution 1:[1]

Depending on the type of waiting you want there are multiple ways to reach your goal. This link will provide you an overview alongside some code.

Solution 2:[2]

I hop it help you

I dont know you are using selenium on which language You can search "how to wait for load an element in selenium"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 PhilipAllStar
Solution 2 Davidazad