I have tried a few ways to run my C# Selenium WebDriver Tests for my local web application (running in Docker containers - http://localhost) on my Dynamic Selenium Grid, but nothing succeed. I have searched solution for a few days but nothing works. I would appreciate if any solutions or comments. Thanks.
First try: I changed the application URL from http://locahost to http://host.docker.internal. I got error "a problem connecting to authentication server" when trying to browse the web application. Authentication server is a KeyCloak docker container which it is configured in other containers as below. And in hosts file it is mapped that IP address to "host.docker.internal". That is configuration of the web application.
environment: - Authentication__Authority=http://ipaddress/keycloak/
<appSettings>
<add key="appURL" value="http://host.docker.internal"/>
<add key="testRunType" value="Grid"/>
<add key="gridUri" value="http://localhost:4444/"/>
</appSettings>
Second try: I added "network_mode: host" into Dynamic Selenium Grid docker compose. But the Selenium Grid could not start.
