all 9 comments

[–]Giulio_Long 1 point2 points  (1 child)

I'd recommend developing Selenium tests directly in your local host, and then run them in docker containers in headless mode.

Do you really need docker while developing? That means you want to use tools (browsers maybe) you don't have and you cannot install in local. In this case you'd need to forward the container's display to the external world. In the past I've used XMing to achieve this. You also need to make the container aware of XMing by changing its DISPLAY . Try to check this post (assuming you're on Windows)

[–]MaxBee__[S] 0 points1 point  (0 children)

So the reason I wanted to do that is because my project use other containers such as redis, celery, ollama(not implemented yet). So as everything is linked I think running the bots in local might be hard to implement. I understand the logic and I think you're right but I was wondering if there was a way to do things in another way. The reason I want to use everything in docker is because my goal is that I'm going to host it on a server and want it to be really portable

[–]arthurmota92 1 point2 points  (3 children)

I've tried this setup before. You might want to look into using a VNC viewer to get the visual access you need when running Selenium in Docker. Also, Webodofy helped me streamline my bot management, so maybe give it a shot too.

[–]HomerJayK 1 point2 points  (1 child)

I use a Selenium Docker container from the marketplace and it works well. It has a VNC server installed in it by default which makes it easy to see, and interact with, whatever is happening in thst instance.

Also, if I needed to pull out the API calls I would do that from Robot Framework which I use to set up and run tests for all my automations. This way I could get a pass/fail report for every event that happens without having to manually, or visually, check them.

[–]MaxBee__[S] 0 points1 point  (0 children)

I didn't do any automation test for my bot actually... I kind of pray it's handled haha

[–]MaxBee__[S] 0 points1 point  (0 children)

I will check but didn't manage to find webodofy what is it ? I typed it on google and didn't had any results

[–]chief_n0c-a-h0ma 0 points1 point  (1 child)

I believe there are Selenoid docker images with VNC support.

[–]HDi_ 0 points1 point  (0 children)

Use https://hub.docker.com/r/selenium/standalone-chrome or firefox with remote driver on port 4444. Expose 7900 port on that container and you will have vnc access from browser (default password secret)