none
CodedUITest doesn't dectect components, only the window RRS feed

  • Question

  • hello,

    I have a problem with  VS and codedUITest .

    When I try  to record my clicks or add assert ,  I can't select  textBox, button or anything .... it is always the window ...  It is like there is no component In my window ...

    How can I do to fix it ?

    I am using custom WPF application,  VS 2017 Enterprise  v15.8.7 

    Thank you for your help and/or your ideas


    • Edited by coralieM Thursday, January 31, 2019 1:47 PM
    Thursday, January 31, 2019 9:38 AM

Answers

  • Hi friend,

    Since in the past it works, so do you have any changes recently about computer, project or VS IDE. If have, share such info can help us troubleshooting.

    I suggest we make sure tips below which helps locate the cause of this issue:

    1.make sure we do not have third-party control in WPF app

    2.make sure the scale and layout of PC is 100%

    3.make sure we run the WPF application and Coded UI Test Builder locally

    4.After that, i encounter same issue(it is always click "wpf" window) when i open the WPF.exe in debug mode, but i'm not clear if you use Start Debugging(F5) to open WPF.exe, please make sure we open the WPF window by Start Without Debugging(Ctrl+F5).

    If we have followed tips above then the issue persists, I think we update vs to latest version15.9.6 and repair it to solve it.

     In addition, i'm some confused about what you mean "can't select", so if possible, could you please share a screenshot about your recorded actions like below:

    Any update please contact me. We are looking forward to your reply.

    Best Regards

    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, February 1, 2019 6:27 AM

All replies

  • Hi friend,

    As i know, there has two kinds of Coded UI Test Project. 

    One is Coded UI Test Project(Universal windows) and another is Coded UI Test project. 

    First, make sure we create the second one to test for WPF application.

    And what do you mean custom WPF application? What about the result if we try to recognize a icon in desktop by cross-hair like below:

    Would the blue rectangle occur?

    If the blue rectangle fails to recognise a single icon in desktop, I suggest you repair vs2017 by control pane to check if it solve this issue.

    Sorry for this inconvenience. Look forward to your reply.

    Best Regards

    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, January 31, 2019 10:34 AM
  • thanks for your answer

    when I create the project, I  select "Projet de test codé de l'interface utilisateur" = coded UI test user project  

    I have no problem with  Windows Icon, it is OK : 


    but it is when I try to use it in My WPF application that I have problem

     

    I can't select  anything inside the window ... 

    (I can't add picture ... )

    PS: I suceeded to do this in the past but not since few days ....

    • Edited by coralieM Thursday, January 31, 2019 1:28 PM
    Thursday, January 31, 2019 1:16 PM
  • Hi friend,

    Since in the past it works, so do you have any changes recently about computer, project or VS IDE. If have, share such info can help us troubleshooting.

    I suggest we make sure tips below which helps locate the cause of this issue:

    1.make sure we do not have third-party control in WPF app

    2.make sure the scale and layout of PC is 100%

    3.make sure we run the WPF application and Coded UI Test Builder locally

    4.After that, i encounter same issue(it is always click "wpf" window) when i open the WPF.exe in debug mode, but i'm not clear if you use Start Debugging(F5) to open WPF.exe, please make sure we open the WPF window by Start Without Debugging(Ctrl+F5).

    If we have followed tips above then the issue persists, I think we update vs to latest version15.9.6 and repair it to solve it.

     In addition, i'm some confused about what you mean "can't select", so if possible, could you please share a screenshot about your recorded actions like below:

    Any update please contact me. We are looking forward to your reply.

    Best Regards

    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, February 1, 2019 6:27 AM
  • hello !

    Thanks for your answer !

    Yes I had "Click WPF window" instead of  "click button" or "click label" or everything else !

    but your point "4." solve my problem ! 
    I run my application with ctrl + F5 and  surprise !!! I can select my button and everything !!

    so thank you  it is working :)  

    Friday, February 1, 2019 7:57 AM
  • Hi friend,

    It's quite good news. If it really helps solve your issue, please remember to mark it as answer so that other community members can benefit from it. 

    Have a nice day!

    Best Regards

    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, February 1, 2019 8:00 AM