--- id: "b0e0919b-d484-47ed-8591-b11ce4ad7404" name: "InsertText Replacement Trap" micro_summary: "`type_text()` inserted at the caret despite visible selection and duplicated text; delete the selection with Backspace before insertion." status: "discarded" see_also: [] scope: "Failed approach: relying on `type_text()` to replace a visually selected Google Slides line." discard_reason: "CDP text insertion did not replace Slides' visible selection and duplicated content; explicit Backspace-before-type is the verified path." --- After `Home` then `Shift+End`, Google Slides visibly highlighted the line, but CDP `type_text()` still inserted text rather than replacing the selection. Repeating the attempt compounded the duplicate. The verified correction is `Backspace` first, confirm the box is empty, then `type_text()` once.