Fix Save Attribute appium action conflicting with element save-parameter handling#717
Conversation
…ter handling Get_Element() has its own "save parameter" feature that treats the Field column as a variable name to cache the located element under. Save_Attribute_appium reuses the same "save parameter" tag with the opposite meaning (Field = attribute to read, Value = destination variable), so passing the full step_data to Get_Element made it try to save the element under the attribute name (e.g. "content-desc"), which fails variable-name validation and logs a spurious error. Now strips the save-parameter row before calling Get_Element, matching the existing Selenium/Playwright Save_Attribute implementations. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
🔎 ZeuZ PR ReviewOpen the full report in ZeuZ: Review findings and apply suggestions
Agent breakdown→ General ReviewStatus: ✅ Completed No actionable issues found in the diff; the change correctly separates the saved-variable parameter from element location data and adds a missing validation path. → Security ReviewStatus: ✅ Completed No security issues found in the PR diff. The change only refactors parameter parsing for an Appium save-attribute action and does not introduce new injection, auth, secrets, or exposure risks. → Performance ReviewStatus: ✅ Completed No performance regressions or scalability concerns stand out in this PR diff; the change is narrowly scoped to fix parameter handling without introducing heavier query, memory, or I/O patterns. → Testing ReviewStatus: ✅ Completed The fix changes control flow in
|
Summary
LocateElement.Get_Element()has its own generic "save the located element to a variable" feature, keyed off the"save parameter"sub-field, where it treats the Field column as the variable name.Save_Attribute_appiumreuses that same"save parameter"tag with the opposite convention (Field = attribute to read, Value = destination variable) and was passing the rawstep_datastraight intoGet_Element.content-desc | save parameter | testing,Get_Elementtried to save the located element under the variable namecontent-desc, which fails Python identifier validation (hyphen) and logs a confusing'content-desc' is not a valid variable nameerror — even though the actual attribute save intotestingstill worked."save parameter"row out of the data set before callingGet_Element, mirroring the existing (correct) pattern already used inSave_Attributefor Selenium and Playwright.Nonecheck onvariable_nameso the action fails cleanly with a clear message instead of crashing if no"save parameter"row is present.Test plan
content-desc) and confirm no spurious "invalid variable name" error is logged, and the variable is saved correctly.text) and confirm behavior is unchanged."save parameter"row now fails with the "Variable name should be mentioned" message instead of raising an unhandled exception.🤖 Generated with Claude Code