我在Silverlight项目中声明了一个TextBox,其内容为"123456",然后在Coded UI测试中使用以下代码.首先,它搜索并单击TextBox以设置焦点,然后尝试删除字符.
currencyPage.ClickEditByAutomationId("textBox");
Keyboard.SendKeys("{END}");
Keyboard.SendKeys("{BACKSPACE}");
Keyboard.SendKeys("{BACKSPACE}");
Keyboard.SendKeys("{BACKSPACE}");
Keyboard.SendKeys("{BACKSPACE}");
Keyboard.SendKeys("{BACKSPACE}");
Run Code Online (Sandbox Code Playgroud)
这是我的TextBox中生成的文本:123456BBBBB
我究竟做错了什么?文本框的XAML: