Dear all,
I have just found out that from the C# code I can start recording modules with
MyRecording.Start();
Let us assume that the module containing the C# code doing the call is MainModule and that MyRecording has some variables of its own.
The question is, can I
- data binding between global parameters and MainModule
- the C# code of MainModule binds some of the global parameters to the variables of MyRecording
- the C# code calls MyRecording
In other words, I need to know if I can do the data binding of a module inside C# before calling the module itself. I hope I am making myself clear
Thanks in advance!!!
Data binding in C#
- giuseppe.lacagnina
- Posts: 113
- Joined: Fri Sep 18, 2015 10:25 am
- Location: Brunn am Gebirge, Vienna, Austria
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Data binding in C#
Hi giuseppe.lacagnina,
you can bind a global parameter to a recording variable by using the following lines of code
Hope this helps overcoming your intention.
Regards,
Markus (S)
you can bind a global parameter to a recording variable by using the following lines of code
var rec1=Recording1.Instance; rec1.RecordingVar= TestSuite.Current.Parameters["GlobalParam"]; //Whereby GlobalParam = Name_of_global_Parameter and RecordingVar = Name_Of_Module_Variable Recording1.Start();Please find also attached a short Sample Project whereby this code is used to bind the global parameter to a recording variable.
Hope this helps overcoming your intention.
Regards,
Markus (S)
You do not have the required permissions to view the files attached to this post.
- giuseppe.lacagnina
- Posts: 113
- Joined: Fri Sep 18, 2015 10:25 am
- Location: Brunn am Gebirge, Vienna, Austria
Re: Data binding in C#
Hi!
It looks right, thanks. I will try.
Cheers,
G.
It looks right, thanks. I will try.
Cheers,
G.