LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

WPF technology control with labview

Hi all 

I have question please 

I need to test UI Gui , some suggestion form SW engineer to use WPF (Windows Presentation Foundation ) technology  its kind of XAML

question is can I control on WPF using labview ?

 

Thanks 

Wisam

 

0 Kudos
Message 1 of 11
(6,152 Views)

If I have understood you correctly:

  1. You have been supplied an application written in WPF targeting the .NET Framework.
  2. You want to test the user interface interactivity on this WPF application
  3. You want to use LabVIEW to automate the testing of the WPF application.

This is possible but it is not a native LabVIEW feature - you need an API to call within LabVIEW itself using .NET or Win32 calls. You could use Microsoft's UI Automation framework; you can use it directly or preferably use a framework that wraps it like TestStack.White. Here's an old discussion although still relevant (https://stackoverflow.com/questions/58340/how-to-test-a-wpf-user-interface). Although most tutorials around will walk you through how to do it using Visual Studio you can execute the same library calls using LabVIEW .NET nodes, as long as you work within the normal limitations of .NET integration in LabVIEW (mostly generics - https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8iWSAS).

0 Kudos
Message 2 of 11
(6,114 Views)

Hi 

I dont really know if I understand the old discussion  that you send to me 

you send I need an API to call within LabVIEW itself using .NET or Win32 calls do you mean define  .NET in this way ( see pic attach) 

did you mean choose on of these  UI Automation ?

 

Thanks 

 

0 Kudos
Message 3 of 11
(6,091 Views)

First; can you confirm that the three items I listed are what you are trying to achieve?

0 Kudos
Message 4 of 11
(6,072 Views)

yes this is exactly  what I want 

0 Kudos
Message 5 of 11
(6,053 Views)

Hi 

I have urgent question please 

what is the best way testing UI based on windows using labview

I need to test SW features on windows application that written based on visual .net

I want to preform SW testing feature such as  check button, contro and event ,

our SW team suggest working with WPF but as I know WPF Cant support with labview , may be I am wrong really don't know 

I need to know if any one preform such kind of testing SW on UI using labiew , and how he did it  the interface using what 

I hope I explain my self 

 

Thanks

Wisam  

0 Kudos
Message 6 of 11
(6,059 Views)

I'm not aware of any convenient frameworks or tools provided by third parties specifically for LabVIEW to do what you want. Your best option is to use TestStack.White or FlaUI and make the necessary .NET calls in a LabVIEW VI(s). You can start here (https://teststackwhite.readthedocs.io/en/latest/ or https://github.com/Roemer/FlaUI). If you are not familiar with .NET or WPF then it could be a challenging process, especially if its 'urgent'.

0 Kudos
Message 7 of 11
(6,029 Views)

Hi 

is there any example that I can refer to?

are these application need to be purchase?

are they can be activate using dll ?

Thanks

 

0 Kudos
Message 8 of 11
(6,007 Views)

Why are you trying to control a WPF UI using LabVIEW? What is the goal of this?

Adena L.
Technical Support Engineer
National Instruments
0 Kudos
Message 9 of 11
(5,985 Views)

Both tools I referred to are open source (if you take a look at the pages). As I said; I'm not aware of any specific example showing how to do what you are asking. If you are unfamiliar with the technologies and strategies involved then I would suggest that LabVIEW is probably not the best choice for what you are trying to achieve - save yourself some of the complexity and try following the examples written in C# targeting a .NET assembly.

0 Kudos
Message 10 of 11
(5,983 Views)