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:
The element exists and is returned by FindSingle method, but methods like Click or MoveTo in 80% of cases fail.
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 ..