Skip to content

REQ-75: Refector: Web Action Copy Image into Browser Action#696

Closed
Antu7 wants to merge 5 commits into
devfrom
zeuz-REQ-75
Closed

REQ-75: Refector: Web Action Copy Image into Browser Action#696
Antu7 wants to merge 5 commits into
devfrom
zeuz-REQ-75

Conversation

@Antu7
Copy link
Copy Markdown
Collaborator

@Antu7 Antu7 commented May 23, 2026

ZeuZ Agent

  • Item: REQ-75
  • Type: Requirement

Item Description

Title: Refactor copy image into browser to use a single input row

The current copy image into browser Selenium action should be refactored so the step definition no longer requires a separate image variable row. In Zeuz Node, the shared-variable syntax %|...|% is already resolved by the framework during action processing, so the action can accept either a literal file path or a shared-variable reference through the existing image file input parameter.

This action is implemented in Framework/Built_In_Automation/Web/Selenium/BuiltInFunctions.py and is registered in Framework/Built_In_Automation/Sequential_Actions/action_declarations/selenium.py as copy image into browser. The action currently checks for both image file and image variable, then resolves the path, validates the file type, loads the image bytes, and converts them to Base64 before placing the image into the browser clipboard. The parsing logic also relies on the standard sequential action pipeline in Framework/Built_In_Automation/Sequential_Actions/sequential_actions.py, which already supports %|...|% interpolation and attachment/file resolution.

Proposed behavior:

  • Keep only one user-facing input row for this action: image file.
  • Allow the value to be either a direct filesystem path or a shared variable reference such as %|image.png|% or %|image_var|%.
  • Let the framework’s existing variable resolution handle the distinction between literal paths, shared variables, and attachments.
  • Remove the need for a dedicated image variable row from test steps and documentation examples.

Implementation notes:

  • The action should continue to support the existing file formats already accepted by the runtime, including PNG and SVG.
  • Path resolution should still work for attachments and environment-specific paths through the normal parsing flow used elsewhere in Zeuz Node.
  • If the resolved value is missing, unreadable, or points to an unsupported format, the action should fail with a clear error message.
  • The action must preserve its current clipboard behavior so downstream browser paste operations continue to work unchanged.

Examples:

Before:

Field        Sub Field        Value

image file      input parameter    %|image.png|%

copy image into browser    selenium action    copy image into browser

 

Field        Sub Field        Value

image variable    input parameter    %|image_var|%

copy image into browser    selenium action    copy image into browser

After:

Field        Sub Field        Value

copy image into browser    selenium action    %|image_var|% path or mix (anything)

Scope impact: this change affects the Selenium action declaration, the corresponding built-in function, and any documentation or sample test cases that still show image variable as a separate step field.

Additional Instructions

Generated by ZeuZ Agent.

ZeuZ Agent and others added 2 commits May 23, 2026 08:10
Co-Authored-By: ZeuZ Agent <info@zeuz.ai>
Co-Authored-By: ZeuZ Agent <info@zeuz.ai>
@Antu7
Copy link
Copy Markdown
Collaborator Author

Antu7 commented May 23, 2026

🔎 ZeuZ PR Review

Open the full report in ZeuZ: Review findings and apply suggestions

Overview Value
Agents ✅ 4 completed
Suggestions 💡 2

Agent breakdown

→ General Review

Status: ✅ Completed
Suggestions: 1 suggestion

One likely regression: the refactor removes support for the existing image variable / imagevar input path, which can break older automation steps that still use shared variables for this action.

→ Security Review

Status: ✅ Completed
Suggestions: 0 suggestions

No high-confidence security findings in this PR diff. The changes tighten image-copy input handling and add safer file-read error handling without introducing an obvious new injection, auth, or secrets issue.

→ Performance Review

Status: ✅ Completed
Suggestions: 0 suggestions

No performance regressions found in the PR diff; the changes are focused on input handling and logging rather than query, memory, or algorithmic behavior.

→ Testing Review

Status: ✅ Completed
Suggestions: 1 suggestion

The PR changes a user-facing Selenium action, but there is no regression coverage for its new input contract or validation paths. I recommend adding focused unit tests for the new image file expression flow and the deprecated imagevariable rejection.

Open ZeuZ to inspect full findings, continue an agent conversation, or apply safe patch suggestions.

ZeuZ Agent and others added 2 commits May 23, 2026 10:27
Co-Authored-By: ZeuZ Agent <info@zeuz.ai>
@Antu7
Copy link
Copy Markdown
Collaborator Author

Antu7 commented May 23, 2026

🔎 ZeuZ PR Review

Open the full report in ZeuZ: Review findings and apply suggestions

Overview Value
Agents ✅ 4 completed
Suggestions 💡 5

Agent breakdown

→ General Review

Status: ✅ Completed
Suggestions: 1 suggestion

The PR has one blocking issue: the copy_image_into_browser change still contains unresolved merge conflict markers, which would break the module. I didn’t find other high-signal correctness issues from the diff.

→ Security Review

Status: ✅ Completed
Suggestions: 1 suggestion

No security vulnerabilities were introduced in the reviewed logic, but the PR contains unresolved merge conflict markers in BuiltInFunctions.py that must be removed before merge.

→ Performance Review

Status: ✅ Completed
Suggestions: 1 suggestion

One minor efficiency issue: copy_image_into_browser now does extra path normalization and multiple filesystem probes before opening the file. No critical performance blockers found.

→ Testing Review

Status: ✅ Completed
Suggestions: 2 suggestions

The new test covers the main happy path, but it leaves several newly added failure branches unverified, so the regression protection is still thin.

Open ZeuZ to inspect full findings, continue an agent conversation, or apply safe patch suggestions.

Co-Authored-By: ZeuZ Agent <info@zeuz.ai>
@Antu7
Copy link
Copy Markdown
Collaborator Author

Antu7 commented May 24, 2026

🔎 ZeuZ PR Review

Open the full report in ZeuZ: Review findings and apply suggestions

Overview Value
Agents ✅ 4 completed
Suggestions 💡 3

Agent breakdown

→ General Review

Status: ✅ Completed
Suggestions: 1 suggestion

Critical regression: the refactor removes the copy_image_into_browser action entirely, so existing action wiring and the new test module cannot import or execute it. I found one high-signal issue and no lower-priority findings worth separating.

→ Security Review

Status: ✅ Completed
Suggestions: 0 suggestions

No security findings in this PR diff. The change is a refactor of the image-copy Selenium action and its documentation/tests, with no new injection, auth, secrets, or exposure issues evident from the patch.

→ Performance Review

Status: ✅ Completed
Suggestions: 0 suggestions

No performance regressions or scalability issues were introduced by this PR diff; the changes are limited to documentation and tests, with no new hot-path query, memory, or network behavior.

→ Testing Review

Status: ✅ Completed
Suggestions: 2 suggestions

The added tests cover the new happy path, but they are not sufficient to protect the refactor: they import a function that was removed from the diffed module and they leave the error/fallback branches untested.

Open ZeuZ to inspect full findings, continue an agent conversation, or apply safe patch suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants