1. type and keyboard Commands Not Recognized in a Specific Context (Facebook Lexical Editor)
Issue encountered:
Although the type and keyboard commands are native and recognized by RTILA X, they were ignored by the engine in our project, raising the warning [WARN] - Command: unknown command | Data: {"command":"type"} in the logs. This issue occurred in a very specific context: entering a multiline comment with emojis and mentions (@) inside Facebook’s rich text editor (Lexical), itself encapsulated in a popup (dialog) opened via JavaScript.
Faulty native commands:
type(parameters:text,selector,delay,clear)keyboard(parameters:key,selector)
Context details and JSON structure used:
Commands were placed in the then block of an if condition. The selector targeted a complex Rich Text editor:
div[role='textbox'][contenteditable='true'][data-lexical-editor='true'] p.
The text to enter contained real (physical) line breaks, emojis (
,
), and special characters.
Excerpt of failed JSON structure:
{
"command": "type",
"name": "type-comment-text",
"params": {
"selector": "div[role='dialog'][aria-labelledby] div[role='textbox'][contenteditable='true'][data-lexical-editor='true'][tabindex='0']:not([aria-hidden]) p",
"text": "${ai_comment_text}",
"delay": 50,
"timeout": 15000,
"clear": true
}
}
It is possible that using RTILA variables (${ai_comment_text}) containing physical line breaks interpreted by AI, or the exact parameter structure, caused the RTILA parser to silently reject the command as “unknown”.
Workaround:
Replace with a run_script command using the underlying Playwright API (page.keyboard.type() and page.keyboard.press()). This works perfectly as Playwright sends real system events to the browser, which is necessary for Rich Text editors like Facebook’s, bypassing the native command parsing issue.
2. IF Conditions with type: "script" - state is not defined
Issue encountered:
When using an IF condition with type: "script", the state object (holding project variables) is not injected into the JavaScript evaluation context. The error state is not defined occurs, crashing the workflow. The “JS expression” field in the UI also remains empty when importing JSON.
Faulty native command:
ifwithcondition.type = "script"andcondition.script = "state.variables.ai_status === 'OK'"
Workaround:
Use the “DOM flag” technique. Instead of evaluating a JS variable directly in IF, use a preceding run_script that modifies the page DOM by adding an attribute data-ai-ok='true' on the <body> tag if the condition is met. Then use native IF with type: "element_visible" and selector body[data-ai-ok='true']. This is 100% reliable and circumvents the JS scope bug.
3. IF Conditions with type: "variable_contains" - Unsupported condition type
Issue encountered:
The condition type variable_contains, which logically checks if a variable contains a string, is not supported by the engine and causes a fatal error.
Faulty native command:
ifwithcondition.type = "variable_contains"
Workaround:
Same technique as above: use the “DOM flag” with element_visible.
4. for_each Loops - Unstable Behavior with Empty else Block (to verify)
Issue encountered:
In a for_each loop, if an IF condition returns false (e.g., post already liked) and the else block is empty, the workflow sometimes seems to stop or does not properly continue to the next iteration.
(Note: The problem was also observed when using a misconfigured scroll_into_view command that caused loop bugs. Leaving the else empty seems to work sometimes but remains flaky.)
Native command to verify:
for_eachwith IF having emptyelse
Workaround:
Always put a harmless command in the else, like a 100ms wait, to ensure the engine processes moving to the next iteration correctly.
5. Line Breaks and Mentions in Facebook Comment Fields
Issue encountered:
Facebook uses the Lexical editor, which does not behave like a standard text field. Using document.execCommand('insertLineBreak') in DevTools or sending \n does not correctly trigger line breaks and breaks mention detection (@). For example, the second tag is not recognized if line breaks are not handled natively via keyboard input.
Faulty native command:
typewith\nin the text
Workaround:
Use page.keyboard.press('Shift+Enter') followed by page.keyboard.press('Space') for line breaks, and type text line by line with page.keyboard.type(). For mentions, type the name, wait 500ms for the menu to appear, then press space to validate the mention turning blue. Sending real OS events via Playwright bypasses React/Lexical protections.
Summary for RTILA Support
- Analyze rejection of
typeandkeyboardcommands:
Verify why engine returnsunknown commandwhen these commands use variables containing physical line breaks or target Rich Text editors (contenteditable). Ensure they send real keyboard events (like Playwright), not justexecCommand. - Fix IF conditions of type
script:
Inject thestateobject into JS scope so thatstate.variables.xxxworks. Currently, it showsstate is not defined. - Add support for
variable_contains:
This condition type is very useful and expected. - Check robustness of
for_eachwith emptyelse:
Ensure loops proceed properly to next iteration without crashing.