Playwright new actions#695
Conversation
🔎 ZeuZ PR ReviewOpen the full report in ZeuZ: Review findings and apply suggestions
Agent breakdown→ General ReviewStatus: ✅ Completed One high-severity regression stands out: the new Electron launcher uses a private Playwright attribute, which is likely to fail at runtime and make the new action unusable. I didn’t find other issues with comparable confidence in the diff. → Security ReviewStatus: ✅ Completed No security findings in the PR diff. The new Playwright actions reuse existing session and locator flows without introducing clear injection, auth, or secret-handling regressions. → Performance ReviewStatus: ✅ Completed One scalability issue: the single-target list extraction path unnecessarily transposes the full result matrix, creating extra work and memory churn for large element sets. → Testing ReviewStatus: ✅ Completed The PR adds several new Playwright actions and significantly expands existing action behavior, but there are no corresponding tests for the new branches or regression paths. The current test suite only covers session activation and iframe switching, so the new public actions and fallback logic are unprotected.
|
🔎 ZeuZ PR ReviewOpen the full report in ZeuZ: Review findings and apply suggestions
Agent breakdown→ General ReviewStatus: ✅ Completed Mostly solid expansion of Playwright actions, but I found one clear Selenium-compatibility regression and one likely Electron-launch compatibility risk. The text-saving path now returns raw → Security ReviewStatus: ✅ Completed One warning: the updated text-entry flow now logs the full input value, which can leak secrets or other sensitive data into application logs. No critical injection or auth issues stood out in the diff. → Performance ReviewStatus: ✅ Completed No material performance regressions found in the PR diff. The changes are mostly API/behavior additions; I did not see clear N+1 patterns, unbounded result sets, or hot-path algorithmic issues worth flagging. → Testing ReviewStatus: ✅ Completed The PR adds several new Playwright actions and significantly changes core action behavior, but I couldn’t find tests that exercise those new entry points or the new fallback/compatibility paths.
|
🔎 ZeuZ PR ReviewOpen the full report in ZeuZ: Review findings and apply suggestions
Agent breakdown→ General ReviewStatus: ✅ Completed I found one high-confidence correctness regression and one behavior change that can mask failures. The Electron launch path also uses a private Playwright API, which is risky and likely to break across versions. → Security ReviewStatus: ✅ Completed No security findings in the PR diff. The changes add new Playwright actions and parity behavior without introducing an obvious injection, authz, secret-handling, or exposure issue. → Performance ReviewStatus: ✅ Completed No performance regressions or scalability issues stand out in this PR diff; the new actions are mostly session/session-state plumbing and per-action DOM work without obvious N+1, unbounded, or heavy-memory patterns. → Testing ReviewStatus: ✅ Completed The PR adds several new Playwright actions and substantially changes navigation/click/text/attribute behavior, but I don’t see corresponding tests covering the new branches or regressions.
|
PR Type
Feature
PR Checklist
Overview
Adds Playwright implementations for five existing Selenium web actions so test steps can use
playwright actionwith the same parameters as Selenium.New Playwright actions
scroll_to_topsave_attribute_values_in_listsave_web_elements_in_listmultiple_check_uncheckChange_Attribute_ValueBehavior
target parameterparsing,return/return_contains/return_does_not_containfilters, paired list layout, and per-target check/uncheck with skip-on-failure.parent_locatorscoping andoptionrows (e.g.allow hidden) for nested lookups.Select_Deselect).action_declarations/playwright.py.Files touched (core)
Framework/Built_In_Automation/Web/Playwright/BuiltInFunctions.pyFramework/Built_In_Automation/Web/Playwright/locator.pyFramework/Built_In_Automation/Sequential_Actions/action_declarations/playwright.pyBreaking changes: None. Selenium steps are unchanged. Playwright steps must use
playwright actionon the action row.Related work: TASK-2852
Selenium-Parity Update — Existing Playwright Actions
Backfills missing Selenium-supported parameters/options on ten existing Playwright actions, plus a new
Open_Electron_Appaction so Electron apps can be launched from aplaywright actionstep. All previous parameters keep working — these changes are additive.Actions updated
Click_Elementuse jsnow runs a real JSelement.click()(wasforce=True); Selenium-styleoffset(percentage from element center); intercepted-click → JS-click fallback; stale-element retry up to 5× with 1s pauses.Enter_Text_In_Text_Box${; per-keystrokedelayhonored when clearing.Save_Attribute(attribute_name, save parameter, variable_name); addedtagattribute (lower-cased tag name); legacy Playwrightinput parameterform still supported.save_attribute_values_in_listreturn,return_contains,return_does_not_contain,allow hidden,allow disable,paired. No code change required.if_element_existsvalue=variable_nameaction format — writes the value to a shared variable on match,"false"on miss, always returnspassed. Plain form (no=) still returnspassed/zeuz_failed.Wait_For_Elementlocator.wait_for(state=…)call was previously commented out and replaced withasyncio.sleep. Now really waits. Reads timeout from the action value (Selenium style),timeoutoptional parameter, orelement_waitshared variable. Supportsattached/detached/visible/hidden.switch_iframe-1= last iframe); walks back to parent frame and retries when a target can't be resolved in the current context (matches Selenium'sswitch_to.parent_frame()loop).scroll_to_elementmethod(js/webdriver/action chain),additional scroll(fraction of viewport) with auto-direction detection.align to topanduse jsstill work.Go_To_Linkwait time to appear element/wait for element(setselement_waitshared variable),wait time to page load(alias oftimeout),resolution(WxHorW,H→set_viewport_size); timeout now also applied viaset_default_navigation_timeout/set_default_timeout.drag_and_dropsrc/source/dst/destinationprefixes ×element/parent/child/siblingparameters (was previously onlydst/src element parameter). Addeddestination offset(x,ypercentage of half the destination's size from its center) anddelay(seconds) — pauses while holding source over destination before releasing.allow disable/allow hiddenoptions forwarded to both locators.Open_Electron_App_electron.launch(...). Mirrors Selenium's per-OSwindows/mac/linuxpath rows. Supportssession/driver id, repeatableadd argument,cwd,env(KEY=VALUE),timeout,record video/video dir. First Electron BrowserWindow becomes the active page, so downstream element / click / text actions work as in a normal browser session. Registered inaction_declarations/playwright.py.Files touched (this update)
Framework/Built_In_Automation/Web/Playwright/BuiltInFunctions.pyFramework/Built_In_Automation/Sequential_Actions/action_declarations/playwright.pyBreaking changes: None. All previous Playwright step formats continue to work; the additions are Selenium-compatible aliases and behaviors.
Test Cases
Manual verification recommended (use
playwright actioninstead ofselenium action):window.pageYOffsetis0and logs show scroll coordinates.target parametergroups into a shared variable; verify list shape (paired / unpaired).return_contains/return_does_not_containfilters; reuse saved locators in a later click/text step.target parametertuples(field, value, check|uncheck); verify skip when already checked/unchecked and JS fallback when click is intercepted.value(or other property) on an input viainput parameterrows; confirm DOM property update.use js— Click a button withuse js / optional parameter / true; confirm a real JSelement.click()is dispatched (e.g. an overlay-covered button still fires its handler).offset— Click(offset, optional parameter, 50,0)on a wide element; confirm the click lands right of center (Selenium-style percentage from center).clear / trueanddelay / 0.1; verify the old value is cleared via Select-All+Delete and characters arrive one at a time.(text, save parameter, my_var)and(tag, save parameter, my_tag)rows; confirmmy_varholds the element text andmy_tagholds the lower-cased tag name.true=my_flagon a present element setsmy_flag = "true"and the step passes; same step against a missing element setsmy_flag = "false"and the step still passes.wait / hiddenandtimeout / 10; step passes once the spinner detaches/hides (verifies the bug fix).method / js,align to top / true,additional scroll / 0.1near the page bottom; element comes into view and an extra ~10% viewport scroll follows.wait time to appear element / 15,wait time to page load / 60,resolution / 1280,720; confirmelement_waitshared variable is15, default page timeout is applied, and the viewport is resized.src parent parameter+dst element parameterrows,destination offset / 25,0anddelay / 0.5; confirm drop lands right of the destination center and the hold pause is observable.clickstep interacts with it.