cancel
Showing results for 
Search instead for 
Did you mean: 

Pass Object as parameter

Madhi
Contributor

Pass Object as parameter

Can we pass an object as a parameter to another subroutine?

sub test1

set objtextbox =

Sys.Process("app").WPFObject("HwndSource: EngagementHost", Engagement).WPFObject("EngagementHost", Engagement, 1).WPFObject("LayoutRoot").WPFObject("ActivityNavigator", "", 1).WPFObject("Grid", "", 1).WPFObject("LayoutRoot").WPFObject("Border", "", 1).WPFObject("Border", "", 1).WPFObject("Grid", "", 1).WPFObject("Border", "", 2).WPFObject("grdRight").WPFObject("ActivityViewer", "", 1).WPFObject("LayoutRoot").WPFObject("ActivityDock").WPFObject("RadSplitContainer", "", 5).WPFObject("ActivityServiceContainer").WPFObject("DynamicActivityWrapper", "", 1).WPFObject("Grid", "", 1).WPFObject("mainScrollViewer").WPFObject("grdMain").WPFObject("LabelMultiLineTextBox2").WPFObject("stkMain").WPFObject("txtData")



call test2(objtextbox)



end sub


1 REPLY 1
YMinaev
Staff

RE: Pass Object as parameter

Hi,



If you just want to know whether you can use the code you've posted here, the answer is yes. You code is correct.
------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors