SeleniumHQ / SeleniumHQ/docker-selenium

[🐛 Bug]: Could not get absolute path of downloaded file

Open
#2,936 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triaging
Dominant language
Go
Stars
8.7k
Forks
2.5k
Avg merge
10h 16m
Merged PRs (30d)
20

Description

What happened?

Hi all,
I'm using docker selenium full grid (router, distributor, sessions, session-queue, events-bus are on the same VM, and docker-nodes are on different VM-s).
In my tests, I need to download files, and also in some cases, I need to open downloaded files(mostly HTML) in the same session on container browser (wit driver.get($downloded_file_path)), but I'm not able to get path of downloaded file, because it's downloaded in /tmp folder in some generic folder (/tmp/uuid7913403656254552707a679ff8f-89ad-45c8-827b-16e28cede7ba/download4164586578271991079).

Do you have some workaround for getting path of downloaded file? Maybe to add one more parameter 'path' in response of /session/sessionId/se/files endpoint ?

I have this SE_OPTS in my docker node containers:
- SE_OPTS=--enable-managed-downloads true
and also downloadsEnabled capability is set on true on WebDriver:
- setCapability("se:downloadsEnabled", true);

Command used to start Selenium Grid with Docker (or Kubernetes)
router, distributor, sessions, session-queue, events-bus are started on the same VM using single docker compose file:
docker compose -f docker-compose-full-grid.yml up -d

docker-nodes are run on different VM-s using docker compose:
docker compose -f docker-compose.yml up -d
Relevant log output
-
Operating System

Ubuntu

Docker Selenium version (image tag)

4.34.0

Selenium Grid chart version (chart version)

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the managed-downloads behavior behind the /session/sessionId/se/files endpoint, using the docker-compose-full-grid.yml and docker-compose.yml setups described. Reproduce the download across the router, session, and node VMs, then verify what path information is available for reopening the file in the same browser session.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
devops, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.