locked
How to Debug the Extension package for Custom properties in Custom controls? RRS feed

  • Question

  • Hi Experts,

    I am working on to give extensions custom properties of custom controls so that it can be saved as asserts for that custom control. 

    While working on this, am  facing an exception. The exception is caused when the asserts gets populated in the popup window.

    Exception throws and it simply says that the Coded UI Test Builder is Stopped working. 

    I didnt get a stack trace or any exception form my code.

    Some one help me to resolve this.

    Thanks in advance,


    sankar

    Wednesday, June 27, 2012 4:33 AM

Answers

  • Hi Experts,

    I could find out the reason why the crash happens.. its because of the latest fix in the Microsoft.VisualStudio.TestTools.UITest.Framework of version 10.0.40219.1. Its working fine with the 10.0.30319.1. so i think this break should be fixed ASAP.

    Thanks,


    sankar

    • Marked as answer by sankarann Thursday, July 5, 2012 5:10 AM
    Thursday, July 5, 2012 5:05 AM

All replies

  • Hi Experts,

    When i point out with cross above the cell, blue colored rectangle is rounded up the cell and when my mouse up the popup displays and at once the UITestBuilder is stopped working. 

    I have read the debugging procedure in http://blogs.msdn.com/b/gautamg/archive/2010/03/23/writing-extension-for-wpf-custom-control.aspx and by placing break points in the Extension Package, Technology manager and the Property provider, nothing got hit.

    waiting a solution,
    Thanks

    sankar

    Thursday, June 28, 2012 4:37 AM
  • Hi sankar,

    I guess you could provide us the log information against this issue then we could do more further help with you, for how to enable the trace log please see the following article:

    Best Regards,


    Tony Xiao [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, June 28, 2012 6:58 AM
    Moderator
  • Hi Tony,

    Thanks for the reply...

    Below i have given the Stack trace...

    System.NullReferenceException was unhandled
      Message=Object reference not set to an instance of an object.
      Source=Microsoft.VisualStudio.TestTools.UITest.Framework
      StackTrace:
           at Microsoft.VisualStudio.TestTools.UITest.Framework.SwitchingHelper.GetChildrenEnumerator(IUITechnologyElement element, Object parsedQueryIdCookie)
           at Microsoft.VisualStudio.TestTools.UITest.Framework.UITestService.GetChildren(IUITechnologyElement element, Object parsedQueryIdCookie)
           at Microsoft.VisualStudio.TestTools.UITest.Framework.UITestService.GetFirstChild(UITechnologyElement element)
           at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetNavigationElement(UITechnologyElement currentElement, NavigationType navigationType)
           at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.get_FirstChild()
           at Microsoft.VisualStudio.TestTools.CodedUITest.Controls.UIControlLocator.UIControlFinder.Navigate(UITestControl source, NavigationDirection dir, NavigationStates& navigationResult)
           at Microsoft.VisualStudio.TestTools.CodedUITest.Controls.UIControlLocator.UIControlFinder.UpdateNavigationButtons(UITestControl element)
           at Microsoft.VisualStudio.TestTools.CodedUITest.Controls.UIControlLocator.UIControlFinder.CaptureControl(UITestControl element)
           at Microsoft.VisualStudio.TestTools.CodedUITest.Controls.UIControlLocator.UIControlFinder.PlaybackThreadproc()
           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()
      InnerException: 

    Thanks,


    sankar

    Thursday, June 28, 2012 7:05 AM
  • Hi sankar,

    I would like to know if you could record and palyback success on a simple coded UI Test? If the simple test works fine then you should refine your wpf extension and if the simple test doesn’t work, I guess you should reset your Visual studio or start up by safe mode.

    For start with safe mode command:  devenv /SafeMode

    Hope this could help you.

    Best Regards,


    Tony Xiao [MSFT]
    MSDN Community Support | Feedback to us

    Friday, June 29, 2012 10:56 AM
    Moderator
  • Hi Tony,

    Thanks for the reply,

    Record and playback is works fine for a simple sample but this crash causes only for the sample which has the Extension package(ExcelExtension sample). 

    I tried the extension for a custom control say Grid which looks like excel, When the Cross is pointed over the Cell the crash happens..

    I have clarify one more thing that the Custom properties can be displayed in the Coded UI Test Builder popup is only through the Extension Package or is there any way to display it through the override method OnCreateAutomationPeer() which returns the AutomationPeer class derived form FrameworkElementAutomationPeer class.

    I cant step over in my process since this plays a major role in my work. I didn't get the required documentation for this too.

    Thanks for your help in advance.


    sankar

    Friday, June 29, 2012 1:35 PM
  • Any reply on this will be much helpful...

    sankar

    Monday, July 2, 2012 4:12 AM
  • Hi sankarann,
     

    I'll involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
     
    Best Regards,


    Tony Xiao [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, July 4, 2012 7:54 AM
    Moderator
  • Hi Experts,

    I could find out the reason why the crash happens.. its because of the latest fix in the Microsoft.VisualStudio.TestTools.UITest.Framework of version 10.0.40219.1. Its working fine with the 10.0.30319.1. so i think this break should be fixed ASAP.

    Thanks,


    sankar

    • Marked as answer by sankarann Thursday, July 5, 2012 5:10 AM
    Thursday, July 5, 2012 5:05 AM
  • Thank you reporing the issue. Which update do you refer to?  I mean a KB number. I could check if there's known issue.

    regards,


    Forrest Guo | MSDN Community Support | Feedback to manager

    Thursday, July 12, 2012 8:56 AM
    Moderator