Sending Backspace Key to WPF Textbox to delete existing Text

5 posts, 1 answers
  1. cmmdmx
    cmmdmx avatar
    4 posts
    Member since:
    Nov 2015

    Posted 18 Feb Link to this post

    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

  2. cmmdmx
    cmmdmx avatar
    4 posts
    Member since:
    Nov 2015

    Posted 18 Feb in reply to cmmdmx Link to this post

    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

  3. Answer
    Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 23 Feb Link to this post

    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
     
  4. cmmdmx
    cmmdmx avatar
    4 posts
    Member since:
    Nov 2015

    Posted 24 Feb in reply to Ivaylo Link to this post

    Hi!

    Thanks, that should solve my problem! :)

    Max

  5. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 25 Feb Link to this post

    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
     
Back to Top