I've added `window.getSelection().deleteFromDocument();` after this line to clear the selection because `send_keys` uses mouse click to focus on an element so the selection will be missed.