locked
Coded UI - Universal App - Message box control RRS feed

  • Question

  • We are trying Coded UI automation UI testing for Universal application where we were not able to focus or access any controls in message box. Any possible ways to access message box control ?
    Thursday, September 28, 2017 6:48 AM

All replies

  • Hi Arul_guru6,

     

    Did you use template Coded UI Test Project (Universal Windows) for your coded UI test?

    What kind of this message box, could you please provide screenshot of it ?

     

    >> By not able to focus/access the controls in message box

    it during playback or when record the script?  any exception message?

     

    First, please use the cross-hair tool in the coded UI test builder to check if it could identify the control properties in the message box properly.

     

    And during the playback, you could try to use WaitForControlExists(), waits for the control to exist on the UI. I mean wait for the message box exist on the UI, then use DrawHiglight() to the message box.

    Looking forward to your reply.

     

     

    Regards,

    Fletcher


    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.


    • Edited by Fletch Zhou Friday, September 29, 2017 6:23 AM
    Friday, September 29, 2017 6:23 AM
  • Hi Fletcher,

    Yes, I'm using Coded UI Test Project (Universal Windows) template for my test project and also I'm using cross hair tool for UI test builder. 

    I'm facing this issue during playback. While using Cross hair tool, the control type for my dialog box is showing as Window in properties. While using WaitForControlExists() for my dialog box, I'm getting control not found exception.

    Note: I'm using XAML for designing UI.


    Tuesday, October 3, 2017 6:57 AM
  • Hi Arul_guru6, 

    Thanks for your reply. 

    So the issue is that during the playback the message box pop-up could not be found, right?

    But if the control could not be found, and the testing code will fail, and the error message will show in the your test explorer i think. 

    Anyway, please make sure the action that triggers the message box is implemented in your testing code, and of course you could share the testing code with us if it's possible. 

    Also, please post a screen shot of the properties of the control spied by the cross-hair. 

    Thanks for your cooperation. 

    Have a nice day:)

     

    Best regards, 

    Fletcher 


    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.



    • Edited by Fletch Zhou Wednesday, October 4, 2017 5:26 AM
    Wednesday, October 4, 2017 3:17 AM