WPF change window focus?

2 posts, 0 answers
  1. Shaun
    Shaun avatar
    2 posts
    Member since:
    Dec 2011

    Posted 12 Apr 2018 Link to this post



    I'm reviewing the Telerik Testing Framework with WPF. I've managed to launch our application, find 'elements' by Automation ID and I'm able to click these. However, we open a text input window when clicking a button. The text input window is a 'child' window for the MainWindow, however, I'm unable to find any of the visible AutomationID's. Do I need to change to the 'child' window? If so how do I do this?



  2. Elena
    Elena avatar
    1151 posts

    Posted 17 Apr 2018 Link to this post

    Hi Shaun,

    Thank you for reaching us out. 

    Once a new wpf window is triggered you will need to first find it and then continue interacting with it. I hope the WPFWindow class and the WpfApplication class will be useful for you. 

    To set the focus on a window you could use the following: 


    Please let me know if you would need further assistance on our end! Thanks! 

    Elena Tsvetkova
    Progress Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top