microsoft / microsoft/playwright

[Feature]: Playwright testing Web-Serial/Web-USB and Web-BLE

Open
#42,488 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P3-collecting-feedback
Dominant language
TypeScript
Stars
96.3k
Forks
6.5k
Avg merge
1d 6h
Merged PRs (30d)
180

Description

### 🚀 Feature Request

I want to test embedded devices (microcontrollers with usb serial connections), along with some bluetooth stuff.
How is the Serial Port connection dialog surfaced in playwright, I assume permission setting works but this is a question about the connection dialog, similarly how is the browser based web-BLE support testable with playwright?

An example page for testing web-serial: https://espressif.github.io/esptool-js/
Web-BLE here:
https://tyeth.github.io/deepsleep_espnow_wifi_and_ble_env_collector/webapp/?demo=1
And some work related web-BLE/web-serial stuff here: https://code.circuitpython.org/

Linked previous question asking if existing support for Web-USB (chrome only): #16626

### Motivation

I do this regularly, manually, both for fun and work related. This is needlessly manual, and any first class browser dialogs should be supported by playwright IMHO.

Firefox finally added Web-Serial support (still refusing web-usb), and Chromium-based browsers already have support (Chrome/Opera).

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 by reviewing the discussion in #16626 and Playwright's existing browser-permission and dialog handling. The issue names Web-Serial, Web-USB, and Web-BLE examples but no source files or tests; done would require a defined support scope and coverage for the requested device interactions across the relevant browsers.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing-qa, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.