Unable to disable headless argument when running c# tests inside of docker on chrome

Hello! I’m having a bit of trouble with Docker, Selenium, and agent-y things. What I would like to do is to run an agent and chrome inside of docker, and be able to watch the agent manipulate the browser in real time, so as to debug it, etc. Just like you can do locally. For my setup, I’m on ubuntu, and the agent inside the docker thinks its in a linux os. Whenever I run tests, even though I can view a virtual desktop with xfvb, a gui for chrome never appears. I think this is because of the test agent: when I check the logs for the tests the agent is passing a --headless arg to the chrome driver that I haven’t been able to remove with things like the .exclude method. I don’t know how to pass it args to not do that. When I tried looking into why, the closest I got were the v0.60 Documentation that said that “if you run your agents in a “headless” Linux machine, your web tests will run in this mode automatically.”, which might be why I can’t get it to not run headlessly.

I’m unsure of how to resolve this, but if anybody has any thoughts on how I can get the chrome gui to show up, I’m all ears.

Hi @WilsonDev ,

That’s correct.
It will run automatically your web test on headless mode.
However, you can follow this solution that might help you and other users in the community achieve what you desire.

  1. For example this is how docker communicates with TP ports by default:

  2. Now we already know that it is running automatically on a headless browser, what we have to do is to install Linux Virtual Machine (GUI) with the browsers distributions on docker hub:
    Untitled Diagram-Page-2

  3. After we have done the second step we have to create an image for docker, this is how it looks in a diagram:

  • That’s it, but if you looking for a much easier way to do it, you can use a VM or a Linux based machine.

Let me know if it helped you, and if you have any more questions please feel free :slight_smile: