I am trying to select and work with a WPF treeitem, but most of the time I am getting a "Failed to get ElementRectangle property from FlavorElement with flavor 'wpf'. Invocation did not finish within the timeout of '00:03:00'. " error. Actually it's not an error, it's loged with Debug severity and test just goes on, but that action was not performred.
This is my code:
Code: Select all
TreeItem ipnetwork = WOSP_Lib.repo.MainApp.Container_ControlsGrid.SystemTree.Self.FindSingle<TreeItem>("//treeitem/text[@text='IP Network']/..");
ipnetwork.MoveTo(); //<--- generates error
I have tried to manually call EnsureVisible() and Focus() methods, add some delays between steps, but nothing seems to help ..
Any ideas?