Playwright-Selenium feature parity#698
Conversation
- Matches Selenium's `Get_Element` behaviour
* new actions added * clean code added * test case fixes * update on previous actions & new action open electron app added * bug fixes --------- Co-authored-by: Nazmul Ahsan <nazmulahsan@Nazmuls-MacBook-Pro.local> Co-authored-by: Nasif <nasifcodes@gmail.com>
🔎 ZeuZ PR ReviewOpen the full report in ZeuZ: Review findings and apply suggestions
Agent breakdown→ General ReviewStatus: ✅ Completed The PR mostly adds Selenium-parity helpers, but I found two behavior regressions that could misclick elements and hide real navigation failures. → Security ReviewStatus: ✅ Completed No high-confidence security regressions were introduced by this PR diff; the new Playwright parity features mainly expand automation behavior without adding clear injection, auth, or data-exposure flaws. → Performance ReviewStatus: ✅ Completed No material performance regressions found in the PR diff; the changes are mostly parity and robustness updates, with no clear new N+1, unbounded query, or hot-path complexity issues. → Testing ReviewStatus: ✅ Completed The PR adds several new public Playwright actions and materially changes click/text/existence semantics, but there is no direct test coverage for those paths in the repo.
|
- Add missing Playwright action declarations and implementations - Align Playwright action parsing with Selenium step data formats - Improve locator shadow DOM parity and regression coverage - Add focused Playwright parity tests
🔎 ZeuZ PR ReviewOpen the full report in ZeuZ: Review findings and apply suggestions
Agent breakdown→ General ReviewStatus: ✅ Completed I found one critical regression in the new Electron launch path: it uses a private Playwright attribute that will fail at runtime. The rest of the diff is mostly additive and looks directionally consistent. → Security ReviewStatus: ✅ Completed No high-confidence security regressions were introduced in the PR diff. The new Playwright parity features mainly expand automation behavior without exposing clear injection, auth, or secret-handling issues. → Performance ReviewStatus: ✅ Completed Found one meaningful performance issue: the new network-log capture path retains unnecessary request objects and keeps accumulating them in memory for the lifetime of the session. → Testing ReviewStatus: ✅ Completed The PR adds several new Playwright actions and materially changes click/navigation behavior, but the parity test file only covers older helper paths. I added focused regression coverage for the Selenium-compatible navigation wrapper and the JS click fallback, which are the most likely to regress silently.
|
- Add shared browser compatibility hydration before execute-python snippets run - Lazily bridge Selenium and Playwright sessions using existing CDP attachment paths - Support top-level await for async Playwright custom code while preserving sync snippets
- Read the running Playwright Chromium version from the CDP version endpoint - Prefer ZeuZ Chrome-for-Testing cached chromedriver before downloading with webdriver-manager - Attach Selenium with a matching ChromeDriver to avoid browser-version mismatch failures
🔎 ZeuZ PR ReviewOpen the full report in ZeuZ: Review findings and apply suggestions
Agent breakdown→ General ReviewStatus: ✅ Completed I found one correctness issue in the click fallback path: the new JavaScript fallback changes semantics for right-click and double-click actions. Otherwise, the PR looks internally consistent from the diff provided. → Security ReviewStatus: ✅ Completed No security regressions found in the PR diff. The new Playwright parity actions mainly expand automation coverage, and I did not see a concrete injection, authz, path traversal, or secret-handling issue introduced by these changes. → Performance ReviewStatus: ✅ Completed Two performance regressions stand out: network logging now retains all captured events in memory until stop, and Selenium/Playwright bridging does extra version probing and driver resolution on the connection path. → Testing ReviewStatus: ✅ Completed The PR adds several new Playwright entry points and changes core execution behavior, but I couldn’t find tests covering the new paths or the async
|
Goal
Bring Playwright web actions closer to Selenium action behavior so existing Selenium-style step data works with Playwright.
Playwright actions changelog
open browsergo to linkgo to link v2tear down browser/teardownswitch browserdefaultsession when no id is provided.driver id,driverid,driver tag,page id, andsession.click and downloadkeystroke keys/keystroke charsCMD,PLUS,MINUS, andDASH.validate full text/validate partial textignore casebehavior.save attributeinner_text()for closer Selenium parity.get element infosizeandlocationdata.get current urlscrollpixelsrows.scroll to element/scroll element to topselect by visible text,select by value,select by indexdeselect all,deselect by visible text,deselect by value,deselect by indexdeselect allanddeselect by indexhandling.check uncheckcheck uncheck allslider barclose tabtabslists.handle alertget text = varandsend text = value.take screenshot webzeuz_screenshotlike Selenium.execute javascriptvariableoptional parameter.return ...page scripts.$elemreplacement for element scripts.upload filefile pathinput parameter support.copy image into browserresize windowwidthandheightrows as element parameters.capture network logextract table data