How do I use one variable in multiple places (beginner)?
-
- Posts: 2
- Joined: Mon May 18, 2020 9:22 pm
How do I use one variable in multiple places (beginner)?
I just started using Ranorex. I have a project that has multiple recording modules. I'd like to test the entry of a field. That field is used in multiple places (entered, searchable, editable) and is across multiple recording modules. I have to bind the parameter multiple times to different module variables and it seems strange. If I mistype, the tests will fail. Is there any way to create a parameter and bind it to multiple variables?
Re: How do I use one variable in multiple places (beginner)?
Hi,
As long as the variable name and parameter name is the same (including character case), you can use "auto-bind" feature, which helps with bindig parameters/data connectors to multiple variables.
Another way is to split your recordings into smaller modules and use single recording just for filling given input, which, as I understand, is always the same? Then simply reuse this module in your test structure, instead of adding the same element to each affected recording.
As long as the variable name and parameter name is the same (including character case), you can use "auto-bind" feature, which helps with bindig parameters/data connectors to multiple variables.
Another way is to split your recordings into smaller modules and use single recording just for filling given input, which, as I understand, is always the same? Then simply reuse this module in your test structure, instead of adding the same element to each affected recording.
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
-
- Posts: 2
- Joined: Mon May 18, 2020 9:22 pm
Re: How do I use one variable in multiple places (beginner)?
Thank you. I was asking about making sure that if I enter x in a field, I can then search for x and verify that something exists called x. I don't want data entry to be a reusable module, I want the value x to be used in multiple places. But you gave me a lot to look into and I found that what I needed was a simple table datasource which I can bind a value to multiple variables.