LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading LabVIEW controls using TestComplete Drag option

Solved!
Go to solution
Hi, We are working on TestComplete and LabVIEW to test our embeded product, here TC script is written to read data from application X and then pass values to LabVIEW controls. I was trying to use Drag option in TestComplete to read LabVIEW control to display data which read from application X but only could able to read outer menu in LabVIEW window (i mean maximize, minimize and close) and its not reading controls or indicators. Below code example when i read control in comunicator application using Drag option in TC. Sys.Process("communicator").Window("#32770", "Test Inputs", 1).Window("Static", "", 1) Below code example when i read control in LabVIEW application using Drag option in TC (its not reading controls or indicators in LabVIEW window) Sys.Process("LabVIEW").Window("LVDChild", "TEST AUTOMATION.vi", 3) Appreciate your help to resolve this problem. Regards, Venkateswaran K
0 Kudos
Message 1 of 8
(4,597 Views)

LabVIEW does not use ms windows controls so if this TestComplete is expecting to get handles to the LabVIEW controls, then it would not work. You can use ActiveX and the Ctrl Value.Set/Ctrl Value.Get methods.

0 Kudos
Message 2 of 8
(4,574 Views)
Since you are automating a task what about using command line arguments to pass data to the LabVIEW application. No need for a fancy UI in an automated test. This solution foes assume your LabVIEW code is built into a stand-alone application.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 8
(4,560 Views)

Thanks for your reply. I'm reading data from application X through TC script.

I need to check, how to pass the data from TC to command line and then passing data to LabVIEW application. Mark, can you share some example code to pass data from command line to LabVIEW.

 

Dennis, I couldn't able to access LabVIEW controls methods in TC.

 

 

Regards,

Venkateswaran K

0 Kudos
Message 4 of 8
(4,539 Views)

In order to pass command line arguments, your VI needs to have the Applications:Command Line Arguments property. There is an example called 'CommandLine.vi' that shows the modifications necessary.

 

I don't know TestComplete so I cannot comment on why you cannot access the ActiveX control methods.

0 Kudos
Message 5 of 8
(4,530 Views)
Solution
Accepted by topic author venkat001

Thanks Dennis, Now its working as expected, solution: we should use ActiveX Rich Text format control and then connect property node of Text to indicator in Labview, In TestComplete use objectspy to access Rich Text format control in labview then u will get code example like below.

set ch0 = Sys.Process("LabVIEW").Window("LVDChild", "ANALOG INPUTS - EVEN CHANNELS", 3).Window("NIContainerClippingWindow", "", 4).WinFormsObject("ControlAxSourcingSite")

then to pass values to labview control use below code

call ch0.Keys("Passing values from TC to LabVIEW")

 

Regards,

Venkateswaran K

0 Kudos
Message 6 of 8
(4,519 Views)

Hi. 

I am facing the similar issue

Can you give me the name of ActiveX we need to add and steps to do after that in TestComplete? This I open in an IE page

 

I get the recognition string in TestComplete only till LVDChild WndClass object

Sys["Browser"]("iexplore")["Page"]("http://192.168.1.5:8000/CANOpen_Sim.html")["Table"](0)["Cell"](0, 0)["Object"]("LabVIEWControl")["Window"]("LVDChild", "Main RT.vi [Remote Panel] - Controller", 1)

 

0 Kudos
Message 7 of 8
(3,422 Views)

Hi SeenaMathew,

 

This thread is six years old and will most likely not be seen by many people. I suggest you create a new thread so more people can see your question.

 

Thanks,

Misbah 

NI AE

0 Kudos
Message 8 of 8
(3,409 Views)