Sendkeys ("{BACKSPACE}") inserts the characters "B" instead of the opposite

I have a TextBox declared in a Silverlight project with the content “123456” and then use the following code in the Coded UI test. First, he searches and clicks the TextBox to set the focus, and then tries to delete the characters.

currencyPage.ClickEditByAutomationId("textBox");
Keyboard.SendKeys("{END}");
Keyboard.SendKeys("{BACKSPACE}");
Keyboard.SendKeys("{BACKSPACE}");
Keyboard.SendKeys("{BACKSPACE}");
Keyboard.SendKeys("{BACKSPACE}");
Keyboard.SendKeys("{BACKSPACE}");

This is the resulting text in my text box: 123456BBBBBB

What am I doing wrong? XAML text field:   

+3
source share
2 answers

Try

Keyboard.SendKeys("{BACK}");
+5
source

Try Keyboard.SendKeys(@"{BACKSPACE}");orKeyboard.SendKeys("{{BACKSPACE}}");

0
source

All Articles