Solved
Forum Discussion
Colin_McCrae
11 years agoCommunity Hero
Depends what the text input is.
Rather than sending a backspace, try sending an "escape" keypress. With many text inputs, that will clear the field.
I suspect your loop sending backspaces is running too fast. Which is why you are only seeing one character being deleted. With loops like that, you often need to be careful that your keypresses, and what happens on screen, are properly synchronised.
If you force a delay in the loop so that after each backspace, it waits until the text content shortens by 1, it would probably work.
Rather than sending a backspace, try sending an "escape" keypress. With many text inputs, that will clear the field.
I suspect your loop sending backspaces is running too fast. Which is why you are only seeing one character being deleted. With loops like that, you often need to be careful that your keypresses, and what happens on screen, are properly synchronised.
If you force a delay in the loop so that after each backspace, it waits until the text content shortens by 1, it would probably work.