Run MainDriver outside node event loop#714
Conversation
Partial match was not picking up action named "validate partial text"
Removes threading and uses async instead for `Thread_ScreenShot`
Similar to Selenium open browser action
Run Playwright teardown before Selenium during driver cleanup so Playwright-owned sessions close their async browser resources first. Teach Selenium global teardown to skip sessions that are owned by Playwright, while still allowing Selenium-owned sessions with Playwright bridges to be cleaned up. Add a regression test covering Playwright-owned sessions with Selenium CDP bridges so Selenium teardown does not close or remove them.
Treat index rows in Playwright switch_iframe as iframe/frame indexes instead of generic element attributes. This prevents index iframe parameters from producing invalid selectors such as [index='1']. Allow a default-content reset and a subsequent iframe target in the same action, matching the Selenium action behavior used by existing test data. Build indexed frame locators with frame_locator(tag).nth(index), preserve selector-based iframe targets, and save the resulting frame locator back to the active browser session. Add regression coverage for switching to default content and then selecting iframe index 1 with a Playwright action.
…d Chromium installation method
- Defaults to viewport instead of full page - Default image quality is now 70% - Skips `PIL` post-processing for Playwright
Avoid starting Playwright during Selenium browser launches and avoid creating Selenium CDP drivers during Playwright launches. Store session metadata with the remote debugging port and attach the opposite framework only when an action from that framework targets the session.
- 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>
- 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
- 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
- Await coroutine functions inside the logger decorator before logging exit. - Preserve existing sync logger behavior and custom fail message logging. - Add tests covering async log order, sync behavior, and fail messages.
- add lazy Get_Element resolution with timeout helper - pass wait values into high-frequency Playwright actions - avoid double wait in Wait_For_Element - cover lazy and resolved locator/action parity paths
- Await sequential loop and bypass handler execution - Run async sequential callbacks inside performance worker threads - Await Playwright page/session activation helpers - Execute async driver functions correctly in threaded runs - Await coroutine results returned by installer wrapper callables - Share sync session cleanup for CLI prompt path
- Normalize legacy wait aliases after browser-driver routing selects Playwright - Parse legacy wait and wait disable rows in Playwright wait handling - Cover Playwright versus Selenium routing and legacy timeout/state parsing
- It did not match the Selenium counterpart behaviour - Selenium's double click action actually does a mouse movement for execution
…up with `resolve=False` Actions: keystrokes, validation text reads, save/get element info, scroll, scroll-to-element, change attribute, select/deselect, check/uncheck, and slider
- Uses Playwright's native CSS locator where possible - Falls back to Selenium-style element locator when needed
- Route Playwright Page, Locator, and FrameLocator lookups through shared LocateElement parsing and query construction. - Fold Playwright execution into existing locator, text filter, shadow DOM, index, and result-selection paths. - Remove the separate Web/Playwright/locator.py helper API and update Playwright actions to use shared LocateElement.Get_Element. - Preserve lazy locator returns for normal Playwright action rows while resolving conditionals, indexes, text filters, and return_all_elements lookups. - Update sequential Playwright conditional lookup to use shared LocateElement. - Refresh Playwright locator and action parity tests for the shared API. - Verified with PYTHONPATH=. pytest tests/test_playwright_locator.py tests/test_playwright_actions_parity.py and compileall checks.
🔎 ZeuZ PR ReviewOpen the full report in ZeuZ: Review findings and apply suggestions
Agent breakdown→ General ReviewStatus: ✅ Completed Found one high-signal regression: coroutine actions bypass the configured timeout in the direct execution path, so nested/load-testing worker-disabled runs can now hang indefinitely instead of failing fast. → Security ReviewStatus: ✅ Completed No security-critical issues stand out in this PR diff. The changes are primarily async refactors and Playwright/Selenium routing updates, with no clear injection, authz, secret-handling, or traversal regressions visible. → Performance ReviewStatus: ✅ Completed One potential performance regression stands out: the new async bridge creates fresh event loops repeatedly in the performance handlers, which can add avoidable overhead in high-throughput runs. → Testing ReviewStatus: ✅ Completed The PR makes the sequential-action execution path async and adds browser-driver routing, but there are no tests covering the new entrypoint behavior or the new Playwright routing branch. I’d add regression coverage to prove the event-loop fix and the driver-selection logic work end to end.
|
Summary
MainDriverApi.main()in the default executor fromRunProcess.asyncio.run()inside the worker thread so the coroutine is executed.Validation
python -m py_compile node_cli.py Framework/MainDriverApi.py