Failed to get ElementRectangle property from FlavorElement with flavor 'wpf'.

Ask general questions here.
kOoO
Posts: 25
Joined: Wed Oct 17, 2018 11:15 am
Location: Zlin, CR

Failed to get ElementRectangle property from FlavorElement with flavor 'wpf'.

Post by kOoO » Fri Oct 09, 2020 2:35 pm

Hello,

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

I have tried to manually call EnsureVisible() and Focus() methods, add some delays between steps, but nothing seems to help ..

Any ideas?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6360
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Failed to get ElementRectangle property from FlavorElement with flavor 'wpf'.

Post by odklizec » Sun Oct 11, 2020 10:43 pm

Hi,

Please, upload a Ranorex snapshot (NOT screenshot) of the problematic tree element, along with full xpath behind WOSP_Lib.repo.MainApp.Container_ControlsGrid.SystemTree repo element. Without, at very least, a Ranorex snapshot, there is very little anyone here can do or suggest. Also, what’s your actual wpf plugin settings and have you tried to use different wpf plugin?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration