Docker Community Forums

Share and learn in the Docker community.

UI Automation test failed in docker container

We’ve got a web application built with angular JS. We use testcafe/protractor UI automation framework to do the UI test. When running these test in a local or remote server without docker it can pass but when running in a local or remote docker container, tests failed due to elements not loaded properly or not found.

Just wonder if anyone else has met with such problems before and if you can give any suggestions. Thanks

Do you have any more details? What elements were not loaded?

Hi Rimelek,

The elements are within a dropdown list of angular JS. So without docker it can load 8 elements while within docker it only loads 4 of them. thanks

Danni

Then my guess is the app in the container tries to access an API to fetch data to build the drop down list and cannot access the API endpoint. Check the container logs or any application log you can find and also open the development console in the webbrowser (usually F12) and go to the network and the console tab to look for error messages.