Hi,
I need to create a global variable, that I can manage from a runner and handle in the code.
For example, my attempts:
1) I created a global variable GlobalParameter in the TestCase:
2) I try to bind it with Recording2, but there isnt't exist the Recording2 record in the bounding dropdown.
3) Even if I bound the GlobalParameter with OpenBrowser record - I can't handle this parameter in the code
How to create the global variable?
-
- Posts: 19
- Joined: Wed Jun 24, 2020 1:15 pm
How to create the global variable?
You do not have the required permissions to view the files attached to this post.
Re: How to create the global variable?
Hi,
Could you please post entire test suite for review?
What Ranorex version do you use (make sure you are using most recent 9.3.2)?
And what code exactly do you use for manipulating global parameter?
You can read global parameter via code like this:
And you can update it with this code:
Could you please post entire test suite for review?
What Ranorex version do you use (make sure you are using most recent 9.3.2)?
And what code exactly do you use for manipulating global parameter?
You can read global parameter via code like this:
Code: Select all
string globalParam = TestSuite.Current.GetTestContainer("tcName").Parameters["globalParamName"];
Code: Select all
TestSuite.Current.GetTestContainer("tcName").Parameters["globalParamName"]="value";
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration