{"id":5390,"date":"2014-03-30T21:23:35","date_gmt":"2014-03-30T21:23:35","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/wpf-naming-controls-generated-during-binding-for-ui-automation-tests-collection-of-common-programming-errors\/"},"modified":"2014-03-30T21:23:35","modified_gmt":"2014-03-30T21:23:35","slug":"wpf-naming-controls-generated-during-binding-for-ui-automation-tests-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/wpf-naming-controls-generated-during-binding-for-ui-automation-tests-collection-of-common-programming-errors\/","title":{"rendered":"WPF: Naming controls generated during binding for UI Automation Tests-Collection of common programming errors"},"content":{"rendered":"<p>Has anyone solved the problem of naming controls that are only generated at runtime?<\/p>\n<p>For example, I have a TreeView used to display a navigation menu. TestComplete supports recording navigation using the TreeView, but since the ItemsSource is databound, they don&#8217;t have names, so if a new item is added to the menu, the recorded tests are broken.<\/p>\n<p>I&#8217;m looking at parsing the tree items in the Loaded event and setting names using RegisterName(), but between the visual and logical trees this seems quite difficult.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Has anyone solved the problem of naming controls that are only generated at runtime? For example, I have a TreeView used to display a navigation menu. TestComplete supports recording navigation using the TreeView, but since the ItemsSource is databound, they don&#8217;t have names, so if a new item is added to the menu, the recorded [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5390","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5390"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5390\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}