This is a migrated thread and some comments may be shown as answers.

Sending Backspace Key to WPF Textbox to delete existing Text

4 Answers 114 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
cmmdmx
Top achievements
Rank 1
cmmdmx asked on 18 Feb 2016, 07:14 AM

Hi!

Like the title says, I have a problem with deleting Text of a WPF textbox. I tried using

element.KeyPress()
and
element.User.KeyPress()
The element is the Textbox.

I could add new text with

element.User.TypeText()
, but the other two methods don't work. Is there any possibility to fix this?

 

Greetings and thanks for help,

Max

4 Answers, 1 is accepted

Sort by
0
cmmdmx
Top achievements
Rank 1
answered on 18 Feb 2016, 01:02 PM

Maybe some additional information:
I'm using Nunit 2.6.4 and the latest Telerik testing framework.

The element is a telerik silverlight FrameworkElement.

None of the KeyPress() Methods react with any Key (even Keys like "a").

So, is there any possibility to delete Text of a Textbox?

Thanks for help, Max

0
Accepted
Ivaylo
Telerik team
answered on 23 Feb 2016, 07:17 AM
Hello Max,

Please refer to this article for more information on sending keystrokes.

Regards,
Ivaylo
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
cmmdmx
Top achievements
Rank 1
answered on 24 Feb 2016, 11:45 AM

Hi!

Thanks, that should solve my problem! :)

Max

0
Ivaylo
Telerik team
answered on 25 Feb 2016, 03:36 PM
Hello Max,

You are most welcome.

Regards,
Ivaylo
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
cmmdmx
Top achievements
Rank 1
Answers by
cmmdmx
Top achievements
Rank 1
Ivaylo
Telerik team
Share this question
or