Kaliiiiiiiiii-Vinyzu / patchright

Undetected version of the Playwright testing and automation library.
https://playwright.dev/
Apache License 2.0
290 stars 31 forks source link

[Feature request] support closed shadow DOM #28

Open fancy45daddy opened 1 week ago

fancy45daddy commented 1 week ago

System info

Source code

Repo: [fancy45daddy/shadowroot](https://github.com/fancy45daddy/shadowroot)

Script: fancy45daddy/shadowroot/@main/play.mjs

Works with import * as playwright from 'playwright' but not with import * as playwright from 'patchright'

Expected

the value in iframe input is bebo

Actual

the value in iframe input still placeholder

kaliiiiiiiiii commented 3 days ago

PW docs: https://playwright.dev/docs/locators#locate-in-shadow-dom

Closed-mode shadow roots are not supported.

Reference for implementation: https://github.com/kaliiiiiiiiii/Selenium-Driverless/blob/ca333fd88b0b7722ac128e08deccbb5ffbd66b39/src/selenium_driverless/types/webelement.py#L237