TestProject Forum

Agent doesn't detect browser

So I’ve been able to deploy the agent to a server as a docker container, its running fine, and has been able to automatically register under the Agents.

But when I try to assign the Agent to a Job, it shows as no browsers are installed/detectable by the agent.

I’ve tried by installing google chrome, chromium, firefox on the server still the agent just isn’t able to detect the browsers. [Attached

]

Am I missing out on anything?

Hello @pratapbari92
The agent is running in a isolated enviroment when running through docker so it can’t see your installed browsers.
That is why I suggest you use docker compose, where you can spin up containers for browsers as well that run with the agent, and the agent will be able to connect to them.
At the moment you have 2 containers, one for FireFox and one for Chrome.
You can see the docker-compose example with the containers here:
https://hub.docker.com/r/testproject/agent

# NOTE: Make sure to update the 'testproject-agent' container volume with a valid local path.
# To execute this docker-compose, store it in a file (e.g. testproject-agent.yaml) an run:
# docker-compose -f <file_name> up -d

version: "3.1"
services:
  testproject-agent:
    image: testproject/agent:latest
    container_name: testproject-agent
    depends_on:
      - chrome
      - firefox
    volumes:
      - /path/to/host/folder:/var/testproject/agent
    environment:
      TP_API_KEY: "REPLACE_WITH_YOUR_KEY"
      TP_JOB_ID: "REPLACE_WITH_YOUR_JOB_ID"
      TP_JOB_PARAMS: '"jobParameters" : { "browsers" : ["Chrome","FireFox"], "testParameters": [{ "data": [{ "ApplicationURL": "https://example.testproject.io/web", "FirstName": "John", "LastName": "Travolta"}]}]}'
      CHROME: "chrome:4444"
      FIREFOX: "firefox:4444"
  chrome:
    image: selenium/standalone-chrome
    volumes:
      - /dev/shm:/dev/shm
  firefox:
    image: selenium/standalone-firefox
    volumes:
      - /dev/shm:/dev/shm
1 Like

Thanks, I Figured :slight_smile: the same while tinkering with my images.