locked
VS CUIT 2013: Hierarchy differences in CUIT 2013 and CUIT 2013 with Update 2 RRS feed

  • Question

  • Hi Everyone,

    There is hierarchy difference in CUIT 2013 and CUIT 2013 with UPDATE 2 as shown in image.

    Sample Application Creation:

    Step 1: Create sample WPF application with one button.

    =============================

      

    <Window x:Class="SampleWPFAPPForCUIT.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:UserClr="clr-namespace:SampleWPFUserControl;assembly=SampleWPFUserControl"
            Title="MainWindow" Height="350" Width="525">


        <Grid>         
            <Button Content="InvokeDlg" HorizontalAlignment="Left" Margin="366,209,0,0" VerticalAlignment="Top" Width="75" />     
        </Grid>

    </Window>

    ================

    Step 2: Create Sample Winform with one button and add Sample wpf app exe to this application(reference).

    Step 3: In Sample Winform app button click event write below code:

    -----------------------

    MainWindow sampleWPFAppObj = new MainWindow();
                   WindowInteropHelper helper = new WindowInteropHelper(sampleWPFAppObj);
                   helper.Owner = this.Handle;
                  sampleWPFAppObj.ShowDialog();

    ---------------

    and click win button add assertion on wpf button, then you can see the hierarchy difference.

    Regards,

    Rajendar.



    • Edited by Rajendar M Friday, May 30, 2014 10:09 AM
    Friday, May 30, 2014 8:54 AM

Answers

  • Hi Rajendar,

    I could repro this issue in my side here:

    But if you just open the WPF app, and then add assertions for the same control, it still has different result.

    Anyway, since I could repro this issue, you can submit this feedback to Microsoft
    Connect feedback portal: http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx,
    Microsoft engineers will evaluate them seriously. Thanks for your understanding. If you submit it, please share me the link here, I will help you vote it.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, June 5, 2014 6:23 AM

All replies

  • Hi Rajendar

    It looks more like the hierarchy change is in the underlying app than in CUIT.  All CUIT is reporting is information provided in the underlying app either via MSAA or UIA.

    HTH

    Friday, May 30, 2014 10:00 AM
  • Hi Ian Holdsworth,

    I have added assertion on same Sample application with CUIT 2013 and CUIT 2013 with UPDATE 2. CUIT assertion form showed different hierarchy.

    Why does it showing different hierarchy in CUIT 2013 and CUIT 2013 with Update 2 ?

    Regards,

    Rajendar.

    Friday, May 30, 2014 10:12 AM
  • Hi Rajendar

    I suspect the dependencies of the Underlying app have changed between versions but CUIT should just be reporting what it sees.  This would explain your other question where the older version was running with MSAA but the newer used UIA.

    HTH

    Friday, May 30, 2014 10:18 AM
  • Hi Ian Holdsworth,

    Application is not modified. You can create sample application with information what I have provided in above and check CUIT 2012 and CUIT 2012 with UPDATE 2. Look like something is modified in CUIT Update 2.

    Let me know if you want sample application to reproduce it.

    Regards,

    Rajendar.


    • Edited by Rajendar M Friday, May 30, 2014 10:57 AM
    Friday, May 30, 2014 10:57 AM
  • I never said the application was modified I implied that it's dependencies have been.  I'm not saying there isn't an issue I'm just saying I don't believe CUIT is the culprit.
    Friday, May 30, 2014 11:09 AM
  • Thanks for Ian’s help.

    Hi Rajendar,

    Thank you for posting in the MSDN forum.

    To get the real tree structure to find a child control, I suggest you could check it with certain tool:

    http://msdn.microsoft.com/en-us/library/ms727247(v=vs.110).aspx

    So we could know the real parents controls and Children controls in your App UI.

    If it is the same result as the result captured by the Coded UI test Builder with VS2013 Update 2. Maybe the VS2013 update 2 resolve this issue. I mean that certain parent controls are not captured by it.

    Best Regard,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 2, 2014 7:04 AM
  • Hi Jack Zhai,

    I test it with UIASpy tool. There is difference between UIASpy and CUIT VS2013 Update 2 hierarchy. Even I select intermediate window in CUIT assertion form (shown in above image) and click on refresh button in CUIT assertion form CUIT Update 2 is not able find that control.

    Look like there is regression in CUIT 2013 Update 2.

    Regards,

    Rajendar.


    • Edited by Rajendar M Tuesday, June 3, 2014 9:07 AM
    Tuesday, June 3, 2014 3:38 AM
  • Hi Rajendar,

    It seems that I couldn't create the WinForm app with the following code. 

                   MainWindow sampleWPFAppObj = new MainWindow();
                   WindowInteropHelper helper = new WindowInteropHelper(sampleWPFAppObj);
                   helper.Owner = this.Handle;
                   sampleWPFAppObj.ShowDialog();

    Could you share us your project? You could upload it to the One drive, and then share me the downloaded link in your new reply, I will test it in my side with the same Environment.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, June 3, 2014 10:11 AM
  • Hi Jack Zhai,

    Can you please give your mail id so that I can forward sample app to you?

    Regards,

    Rajendar.

    Tuesday, June 3, 2014 11:57 AM
  • Hi Rajendar,

    You could send it to:

    v-jake at microsoft dot com

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, June 4, 2014 2:50 AM
  • Hi Rajendar,

    I could repro this issue in my side here:

    But if you just open the WPF app, and then add assertions for the same control, it still has different result.

    Anyway, since I could repro this issue, you can submit this feedback to Microsoft
    Connect feedback portal: http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx,
    Microsoft engineers will evaluate them seriously. Thanks for your understanding. If you submit it, please share me the link here, I will help you vote it.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, June 5, 2014 6:23 AM