Critical Stability Issue Using Kane AI: KeyError 'xpath'

So I am using Kane AI to automate a script within Oracle ERP, so when i go in and author it using Kane ai it proceeds to do all the steps based off the commands I give and once I have saved the changed the produced code will say code validation failed. When I went into the error logs I saw after a “Save” action, the script attempts to interact with the next element (e.g., the Invoice Actions dropdown). It often results in a stale element reference: stale element not found in the current frame. When the script fails to find the next element due to the unstable DOM, KaneAI “Heal” process triggers status: 500 error and **KeyError: 'xpath'.

Solutions I Have Tried:**

  1. Standard Wait Actions: Added hard waits up to 10 seconds, but Oracle’s “Glass Pane” or background refreshes often exceed this or happen after the wait finishes.

  2. Custom JS Sync Script: Used the following script to check Oracle’s internal synchronization, but it returns null in the KaneAI execution environment

Is there a known issue with async JavaScript snippets returning null in the KaneAI environment for Oracle ADF? How can I ensure the test pauses until the Oracle isSynchronized state is true to prevent the KeyError: 'xpath' during auto-healing?