Failed to instrument WPF process.

Ask general questions here.
stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Failed to instrument WPF process.

Post by stapes » Mon Oct 26, 2015 11:57 am

I am getting this warning message:
Failed to instrument WPF process. UI element identification capabilities for this window are limited.
I have tried a couple of the suggestions from your Troubleshooting page. i.e.:

I have added a file Test-365AgilePortal.exe.config which has the following:

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
    <supportedRuntime version="v2.0.50727"/>
  </startup>
  <runtime>
    <enforceFIPSPolicy enabled="false"/>
  </runtime>
</configuration>
The machine i am working on has Microsoft .NET Framework 4 Multi-Targeting Pack installed.

The application being tested is .NET 4.5

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Failed to instrument WPF process.

Post by stapes » Thu Feb 11, 2016 10:58 am

Still getting this error. The link in the error message points here:

http://www.ranorex.com/support/user-gui ... umentation

Here the following advice is given:

Reason #2:
Instrumentation of the WPF application has failed, because the application runs on a .NET 3.0 runtime, and .NET 3.5 is not installed.

Solution:

Upgrade the .NET installation to version 3.5. No changes are required for the application under test.

The PC I am testing on has the following installed:
  • Microsoft.NET Framework 4.5 Multi-Targeting Pack
    Microsoft.NET Framework 4.5 SDK
    Microsoft.NET Framework 4.5.1 Multi-Targeting Pack
    Microsoft.NET Framework 4.5.1 Multi-Targeting Pack (ENU)
    Microsoft.NET Framework 4.5.1 SDK
    Microsoft.NET Framework 4.5.2 Multi-Targeting Pack
    Microsoft.NET Framework 4.5.2 Multi-Targeting Pack (ENU)
    Microsoft.NET Framework 4.5.2 SDK
    Microsoft.NET Framework 4.6 Targeting Pack
    Microsoft.NET Framework 4.6 Targeting Pack (ENU)
    Microsoft.NET Version Manager (x64) 1.0.0-beta5
There is a config file for the test suite containing the following:

Code: Select all

  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
    <supportedRuntime version="v2.0.50727"/>
  </startup>
This last is also contained in the RanorexStudio.exe.config - I do not know if it correct.

I am using Ranorex Studio version 5.4.4.26486

I am still getting this warning message:
Failed to instrument WPF process. UI element identification capabilities for this window are limited.
The following website provides more information on this technology limitation:
http://www.ranorex.com/support/user-gui ... umentation
(This message is only shown once per report.)
Can I safely ignore this message, as everything seems to be working?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Failed to instrument WPF process.

Post by Support Team » Fri Feb 12, 2016 1:39 pm

Hello stapes,

I'm not exactly sure, but I think you are testing iOS applications and not WPF applications.
Ranorex checks all main windows and tries to instrument the applications. It seems there is a WPF application running on your machine which cannot be instrumented for some reason.
If you don't test a WPF application you can ignore the warning. If you don't want to see the warning in your report you can also disable the WPF plugin (setting the "WPF Legacy/UIA Interaction" to UIAOnly) in the General Settings dialog in Ranorex Studio.

Regards,
Bernhard

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Failed to instrument WPF process.

Post by stapes » Mon Feb 15, 2016 11:22 am

Hi Bernhard

I am running a WPF application AND an iOS application AND an Android application. All three tests link together. The first one loads the WPF application and creates a Form Design. The iOS and Android apps both load the Form just created and test it.

The Warning message occurs in the Output refering to the WPF application:
00:22.687 Info Validation

Validating AttributeEqual (Text=$varFormName) on item 'AgilePortal.Form365AgilePortal.FormsContainer.TestFormName'.
00:23.350 Warn WPF

Failed to instrument WPF process. UI element identification capabilities for this window are limited.
The following website provides more information on this technology limitation:
http://www.ranorex.com/support/user-gui ... umentation
(This message is only shown once per report.)
00:23.552 Success Validation

Attribute 'Text' of element for item 'Test_365AgilePortalRepository.AgilePortal.Form365AgilePortal.FormsContainer.TestFormName' does match the specified value.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Failed to instrument WPF process.

Post by Support Team » Mon Feb 15, 2016 5:38 pm

Hi stapes,

Does the warning also appear when tracking the same element with Ranorex Spy?
If yes, would you mind sending us a Ranorex Snapshot from your WPF application when the warning appears?

Regards,
Bernhard

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Failed to instrument WPF process.

Post by stapes » Tue Feb 16, 2016 10:24 am

Hi Bernhard

I got this message when I found the element with Ranorex Spy:
You are accessing WPF elements via the UIA plug-in. UI element identification capabilities for this window are limited. Consider using the native WPF plug-in.
I have attached a snapshot of the element concerned in a zip file.

Regards

Steve
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Failed to instrument WPF process.

Post by Support Team » Tue Feb 16, 2016 11:26 am

Hi Steve,

It seems that you got another warning than in your previous post.
Basically, we have two plug-ins in order to recognize WPF elements.
  • UIA plug-in: recognizes the elements using their UI Automation implementation.
  • WPF plug-in (native): recognizes WPF elements without using the UI Automation implementation.
Depending on the application under test you can choose the plug-in which works better for you.
You can also use the two plug-ins side by side by changing the setting "WPF Legacy/UIA Interaction" in the General Settings dialog in Ranorex Studio.

This message just means that you are using the UIA plug-in and there might be some element identification capabilities which are available when using the WPF plug-in, but not using the UIA plug-in.

If your test still works you can ignore the message.

Regards,
Bernhard

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Failed to instrument WPF process.

Post by stapes » Tue Feb 16, 2016 12:56 pm

Hi Bernhard

"WPF Legacy/UIA Interaction" is currently set to WPF Preferred. It is not giving me the option of both?

Regards

Stephen Staple

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Failed to instrument WPF process.

Post by Support Team » Tue Feb 16, 2016 1:50 pm

Hello Stephen,

Sorry for the misunderstanding, please find below a list describing the settings for the two plug-ins.

WPF Legacy/UIA Interaction settings

Stand alone settings
  • WpfOnly: Show only the native WPF plug-in tree, suppress UIA.
  • UiaOnly: Do not use the native WPF plug-in at all, and keep using UIAutomation for WPF
Side by side settings
  • WpfPreferred: Show both WPF and UIA tree, and return WPF elements for tracking.
  • UiaPreferred: Show both WPF and UIA tree, and return UIA elements for tracking.
I suggest having a remote session in order to analyze the issue on your machine directly.
Please send an email to [email protected] in order to arrange a meeting.

Regards,
Bernhard