Repository navigation
V1.4.0 — SAP Ariba Angular form automation + headless resilience
PETP V1.4.0 — SAP Ariba Angular form automation, plus resilience for headless / background runs.
This release focuses on driving SAP Ariba's Angular Material supplier-registration forms end-to-end in headless mode, and on making silent "green but did nothing" failures observable.
✨ New Selenium processors (SAP Ariba Angular forms)
SELECT_YESNO— picks the 是/否 radio of a yes/nomd-radio-group, located by a fuzzylabelmatch and selected by visible text (Ariba mislabels both buttons "否"). Accepts 是/否, yes/no, true/false, 1/0.SELECT_TREE_DROPDOWN— cascading tree picker (>-separated 1–4 level path, fuzzy/case-insensitive match,check_from_levelto skip a leading "All" root).SELECT_MULTI_DROPDOWN— multi-select checkbox dropdown; find-scroll-check done in a single atomicexecute_scriptto defeat the Angular virtual-scroller's stale-reference / scroll-drift mis-clicks.SELECT_SINGLE_DROPDOWN— type-ahead single select; opens the list, fuzzy-matches the option, clicks once (list self-closes).DATE_PICKER— drives the Angular Material calendar for readonly date inputs that rejectsend_keys; navigates via the year view and matches the day cell by its locale-independent Englisharia-label(e.g.July 20, 2026).- Form feeders & upload — bank-info / contact-info form feeders and a file-upload processor, built on shared form helpers.
🧰 Shared Selenium helpers (deduplication)
SeleniumUtil.click_with_fallback— unified native → move → JS click ladder (Angular Material buttons need native click; JS click as last resort avoids coordinate hit-tests in headless).SeleniumUtil.xpath_literal— single source for xpath string escaping, replacing the copy-pasted_xpath_literalacross four processors.
🧭 Failure diagnostics
timeout_msg(FIND_THEN_CLICK/FIND_THEN_KEYIN) — an optional business message appended to the raised exception when a locator times out (or a click is intercepted) andskip_timeout_errorisno. Supports expressions againstdata_chainplus the special{timeout}variable, e.g."Can not find the supplier {supplier_name} in {timeout} seconds."Plumbed cleanly:expression2strgained anextra_localsseam (runtime-only vars layered overdata_chainwithout mutating it), and the message is resolved lazily only on the failure path.[NOOP]soft-skip logging — any step that completes without doing its work (element not found underskip_timeout_error=yes,condition_fnfalse, intercepted-and-skipped click, iframe switch that never happened) now emits a greppable[NOOP] <Processor>: <reason>warning viaProcessor.log_noop. Converted across the Ariba processors and feeders.
🌐 Headless / background robustness
- Per-Execution browser language —
GO_TO_PAGEgainsbrowser_lang, so locale-sensitive sites (Ariba) render in the requested language in headless mode. Resolution order: explicit arg →PETP_BROWSER_LANGenv →zh-CN. Ignored in headed mode. - Iframe switching uses element presence (not Selenium visibility), fixing hangs when switching into iframes in headless mode.
portable/runtime sync —sync_portable.pycopies engine + processors + an allowlisted set of executions into the portable unit and pushes the code parts to configured external target dirs (code only; never webdriver / download / log / config).
✅ Tests
New unit tests for expression2str extra_locals, the timeout_msg / log_noop / fail_or_skip helpers, and headless browser_lang resolution.
Full changelog: V1.3.1...V1.4.0