#10
type action fails with selector + text due to incorrect target resolution
Disclaimer: This issue text was AI-generated and reviewed before posting.
Summary
type steps that provide both text (the string to type) and selector (target element) can fail by trying to find an element by text instead of using the selector target.
In some environments, type can also emit key events without actually inserting characters into the focused input.
Minimal Repro
Config:
{
"videos": {
"repro": {
"url": "https://example.com/login",
"steps": [
{ "action": "wait", "selector": "#email" },
{ "action": "type", "text": "user@email.com", "selector": "#email" }
]
}
}
}Observed failure:
Step N (type) failed ... Element not found: text="user@example.com"Expected
type should use selector as the element target, focus it, and insert text into that element.
Actual
- Target resolution for
typecan prefertextlookup overselectorlookup. - On some setups, typing events run but input value is unchanged.
Root Cause
resolveTargetindist/lib/runner.jschecksopts.textbeforeopts.selector, sotype.text(payload) is treated like a locator.typeTextin@webreel/corerelies on key dispatch path that may not reliably produce text insertion in all environments.
Suggested Fix
- In runner target resolution: prioritize
selector, then fallback totext. - In core typing: use a reliable insertion path (e.g.
Input.insertText) with fallback behavior.
Activity
0No activity yet.