Failed to instrument WPF process

Bug reports.
rzavsky
Posts: 4
Joined: Mon Feb 04, 2019 9:25 am

Failed to instrument WPF process

Post by rzavsky » Mon Feb 04, 2019 9:36 am

Hello,

Some of my tests are failing because of this error "Failed to instrument WPF process. UI element identification capabilities for this window are limited. Could not set-up managed injection endpoint: Bootstrapping Ranorex Instrumentation failed. ". I found a solution where I have to remove all .NET framework installations and Ranorex. But I would like to ask, if there is any other way how to solve it?

Thanks

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

Re: Failed to instrument WPF process

Post by odklizec » Mon Feb 04, 2019 12:32 pm

Hi,

Have you tried to run your test/Ranorex Studio as an Administrator? This often helps with similar problems.
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

rzavsky
Posts: 4
Joined: Mon Feb 04, 2019 9:25 am

Re: Failed to instrument WPF process

Post by rzavsky » Wed Mar 27, 2019 12:53 pm

Hello,

Yes I tried to run Ranorex Studio as Administrator but it didnt help. I also tried to reinstall Ranorex and .NET framework but the error is still persistent. Is there any other way how to fix it?

Thanks

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

Re: Failed to instrument WPF process

Post by odklizec » Wed Mar 27, 2019 1:04 pm

Hi,

Unfortunately, without seeing the app under test, or (at very least) Ranorex snapshot (NOT screenshot) of the problematic element(s), it's hard/impossible to say what to do. Also, you forgot to mention your actual Ranorex version (currently supported are 8.3.3 and 9.0)? If you are using something older than mentioned versions, please try to install either of the supported versions and try to repeat your problem.
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

rzavsky
Posts: 4
Joined: Mon Feb 04, 2019 9:25 am

Re: Failed to instrument WPF process

Post by rzavsky » Mon Apr 01, 2019 9:16 am

Hello,

I am currently using Ranorex 9.0. In attachments is the snapshot of the problematic element. And the path of the element in my repository looks like "/form[@title='TIKOS - Login' or @title='TIKOS login']/text/container/text[@automationid='Benutzername']".

Thanks
Attachments
RxUsernameInput.rxsnp
(123.35 KiB) Downloaded 6 times

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

Re: Failed to instrument WPF process

Post by odklizec » Mon Apr 01, 2019 9:34 am

Hi,

The snapshot reveals it was saved with Ranorex 8.3.0, which is half a year old and no longer supported, not to mention somewhat buggy ;) So first of all, please update Ranorex with 8.3.3 or 9.0.

Also, there seems to be no instrumentation warning regarding the element you mentioned? So I'm not quite sure, what exactly is the problem? Typically, if Ranorex experiences a problem with element instrumentation, there is such error stored also in the snapshot? So my best guess is, that you saved the snapshot with standalone Spy, where is no such error issued? If the error appears only in Studio/during the test run, it leads me to believe, that you have different WPF-related settings in standalone Spy and Studio? So I would suggest to export settings from standalone Spy and import them in Studio. This way you should get consistent result both from standalone Spy and Studio.
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