Contributions
Re: Silverlight Object hierachy becomes misaligned/jumbled when scroll methods are invoked.
You're right Tony. Very tricky. I do agree that AQA can improve their support for silverlight, and I hope that this thread can help them improve this. After hours of painful attempts to find I decent/elegant workaround. I found something that can probably help you too. If you make any changes to TC options, the object browser regenerates. So, if you execute the following in your test for example, the object hierachy is completely rebuilt and it will fix itself. <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <meta content="Word.Document" name="ProgId" /> <meta content="Microsoft Word 12" name="Generator" /> <meta content="Microsoft Word 12" name="Originator" /> &amp;amp;lt;BR /&amp;amp;gt; &amp;amp;lt;!--&amp;amp;lt;BR /&amp;amp;gt; /* Font Definitions */&amp;amp;lt;BR /&amp;amp;gt; @font-face&amp;amp;lt;BR /&amp;amp;gt; {font-family:"Cambria Math";&amp;amp;lt;BR /&amp;amp;gt; panose-1:2 4 5 3 5 4 6 3 2 4;&amp;amp;lt;BR /&amp;amp;gt; mso-font-charset:0;&amp;amp;lt;BR /&amp;amp;gt; mso-generic-font-family:roman;&amp;amp;lt;BR /&amp;amp;gt; mso-font-pitch:variable;&amp;amp;lt;BR /&amp;amp;gt; mso-font-signature:-1610611985 1107304683 0 0 415 0;}&amp;amp;lt;BR /&amp;amp;gt;@font-face&amp;amp;lt;BR /&amp;amp;gt; {font-family:Calibri;&amp;amp;lt;BR /&amp;amp;gt; panose-1:2 15 5 2 2 2 4 3 2 4;&amp;amp;lt;BR /&amp;amp;gt; mso-font-charset:0;&amp;amp;lt;BR /&amp;amp;gt; mso-generic-font-family:swiss;&amp;amp;lt;BR /&amp;amp;gt; mso-font-pitch:variable;&amp;amp;lt;BR /&amp;amp;gt; mso-font-signature:-520092929 1073786111 9 0 415 0;}&amp;amp;lt;BR /&amp;amp;gt; /* Style Definitions */&amp;amp;lt;BR /&amp;amp;gt; p.MsoNormal, li.MsoNormal, div.MsoNormal&amp;amp;lt;BR /&amp;amp;gt; {mso-style-unhide:no;&amp;amp;lt;BR /&amp;amp;gt; mso-style-qformat:yes;&amp;amp;lt;BR /&amp;amp;gt; mso-style-parent:"";&amp;amp;lt;BR /&amp;amp;gt; margin:0cm;&amp;amp;lt;BR /&amp;amp;gt; margin-bottom:.0001pt;&amp;amp;lt;BR /&amp;amp;gt; mso-pagination:widow-orphan;&amp;amp;lt;BR /&amp;amp;gt; font-size:12.0pt;&amp;amp;lt;BR /&amp;amp;gt; font-family:"Times New Roman","serif";&amp;amp;lt;BR /&amp;amp;gt; mso-fareast-font-family:Calibri;&amp;amp;lt;BR /&amp;amp;gt; mso-fareast-theme-font:minor-latin;}&amp;amp;lt;BR /&amp;amp;gt;.MsoChpDefault&amp;amp;lt;BR /&amp;amp;gt; {mso-style-type:export-only;&amp;amp;lt;BR /&amp;amp;gt; mso-default-props:yes;&amp;amp;lt;BR /&amp;amp;gt; mso-ascii-font-family:Calibri;&amp;amp;lt;BR /&amp;amp;gt; mso-ascii-theme-font:minor-latin;&amp;amp;lt;BR /&amp;amp;gt; mso-fareast-font-family:Calibri;&amp;amp;lt;BR /&amp;amp;gt; mso-fareast-theme-font:minor-latin;&amp;amp;lt;BR /&amp;amp;gt; mso-hansi-font-family:Calibri;&amp;amp;lt;BR /&amp;amp;gt; mso-hansi-theme-font:minor-latin;&amp;amp;lt;BR /&amp;amp;gt; mso-bidi-font-family:"Times New Roman";&amp;amp;lt;BR /&amp;amp;gt; mso-bidi-theme-font:minor-bidi;&amp;amp;lt;BR /&amp;amp;gt; mso-fareast-language:EN-US;}&amp;amp;lt;BR /&amp;amp;gt;@page Section1&amp;amp;lt;BR /&amp;amp;gt; {size:612.0pt 792.0pt;&amp;amp;lt;BR /&amp;amp;gt; margin:72.0pt 72.0pt 72.0pt 72.0pt;&amp;amp;lt;BR /&amp;amp;gt; mso-header-margin:36.0pt;&amp;amp;lt;BR /&amp;amp;gt; mso-footer-margin:36.0pt;&amp;amp;lt;BR /&amp;amp;gt; mso-paper-source:0;}&amp;amp;lt;BR /&amp;amp;gt;div.Section1&amp;amp;lt;BR /&amp;amp;gt; {page:Section1;}&amp;amp;lt;BR /&amp;amp;gt;--&amp;amp;gt;&amp;amp;lt;BR /&amp;amp;gt; Options.Web.TreeModel = "DOM" Options.Web.TreeModel = "Tree" Sys.Refresh I know, a strage workaround, but it works (keeps the relationship between a textblock and ListBoxItem in sync.) This will suffice for what I need. But I hope it can help you and others until AQA resolve the problem. Thanks again Tony Evan1.2KViews0likes0CommentsRe: Silverlight Object hierachy becomes misaligned/jumbled when scroll methods are invoked.
Our List Items contain several/multiple TextBlocks. We need to identify an list box item, by its the name/content of it'sTextBlock.(it's child object) By revisiting, I mean going back to the list box and trying to select another item. I don't use any existing references. The mixing up of the object hierachy is clearly a TestComplete issue. This is proven since after completely shutting down and restarting TestComplete, the hierachy is correct. The problem does not allow me to verify that an item is selected in a listbox because I can only recognise an item by its child (a textblock) and it's parent is incorrect. Evan1.2KViews0likes0CommentsRe: Silverlight Object hierachy becomes misaligned/jumbled when scroll methods are invoked.
Thanks for your reply Tony, I do exactly what you've mentioned. Once the hierachy becomes jumbled, it remains jumbled no matter what you do. I can even reproduce this my manually scrolling up and down the list box. If I only needed to select an item, and not revisit the listbox, this would be fine. But when I revist the listbox, I can't select the item i need to. I'm hoping that AQA can resolve this asap. Thanks Evan1.2KViews0likes0CommentsSilverlight Object hierachy becomes misaligned/jumbled when scroll methods are invoked.
I'm in the process of building a function that can select an item in a SilverLight listbox by its text value(textblock object which is a child of a list box item). SilverLight only loads the the textblock objects for the list items that are visible on screen. For example, if a list has "Item 1" to "Item 100" and only 10 are viewable on screen at any one time and only 10 items will have textblock objects in the object tree. So, in order to interogate the rest of the 90 items, we need to scroll down so that they are loaded into the object tree. This is easy to do, since UIAutomation provides methods and properties for scrolling. However, the object hierachy in TestComplete becomes completely misaligned (jumbled) as we scroll down the list... E.g. - Before scrolling, Item 3 has a textblock of "Item 3". - After scrolling and looking at this in the object browser, it has "Item 17". Therefore, trying to select "Item 3" (using the addToSelection method on it's parent), selects a random item... Have tried using Sys.Refresh, Sys.Process("...").Refresh, and object.refresh everywhere, but to no avail. I suspect this is a TestComplete issue, since shutting down TestComplete completely and reopening TestComplete, the objects appear aligned again. Is there a known solution or workaround for this. I.e. Is there are way to force TC to completely rebuild the object tree? We're using TestComplete 7.52. Thanks Evan13KViews0likes6CommentsInternal Methods and Properties of a .Net Windows Mobile application
Hi, I am looking at automating the testing of a windows mobile application developed on the .Net framework (C#). I am only able to see "Window" objects with TestComplete Methods/Properties(limited) TestComplete's help states the following: "Currently, TestComplete cannot work with Windows Mobile applications (such as .NET Compact Framework applications) like it does with Open Applications <http://www.automatedqa.com/support/viewarticle.aspx?aid=2701> and does not provide access to internal methods and properties of application objects. To automate application objects, use the methods and properties provided by TestComplete." This limitation will have a negative impact on Return on Investment since the automation solution will be less elegant and far more limited. Will the ability for TestComplete to work with .Net windows mobile applications using .Net reflection become available? if so, when is this likely? Thanks Evan6.7KViews0likes1Comment