microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
66.38k stars 3.63k forks source link

[Feature]: file download and upload in Selenium Grid #32554

Closed amardeep2006 closed 1 month ago

amardeep2006 commented 1 month ago

🚀 Feature Request

I want Playwright to be able to download/upload files on browsers running on remote selenium nodes machines .

  1. Click on download link should successfully download the file on remote machine.
  2. Playwright should be able to view downloadable files on selenium grid.
  3. Playwright should be able to download a remote downloaded file to local test runner machine.
  4. Playwright should be able to delete a downloaded file on remote selenium node.
  5. I should be able to upload a file to remote selenium node and then upload to the webpage.

Example

This feature is already implemented in webdriver.io framework. WDIO makes use of selenium grid APIs to perform these operations. The same is possible in selenium Java framework as well.

References : https://webdriver.io/docs/api/selenium https://webdriver.io/docs/api/browser/downloadFile/ https://www.selenium.dev/documentation/grid/configuration/cli_options/#enabling-managed-downloads-by-the-node

Motivation

It will be a good addition to Playwright as other frameworks are already offering it. File operations are very crucial part of automation space. Selenium grid is already offering support for BiDi and Playwright is also adding support for BiDi so it will be good for the ecosystem and make playwright a good companion to Grid even if offered as BiDi only feature.

dgozman commented 1 month ago

Duplicate of #15999.