Hi All,
A noob question.
I have an element in the ranorex repository which has an attribute set to a variable.
eg:
//Column[@text=$varcolumnname]
This Variable has a default value assigned to it "Ccy" in the repo.
Can someone tell me how i can go about setting this variable to something else in user code?
eg: "Name"
I'm thinking i can use the setattributevalue on the element but not sure what the code should be.
Setting Element Attribute in User Code
Re: Setting Element Attribute in User Code
If you just want to change the value of the variable, you can just assign the variable a new value in user code. It is just a .NET string variable type.
You have to have declared the variable in the test module you are using it in.
Also, you need to remember that this will set the variable to the new value for all future uses, until the value is set again.
Code: Select all
varcolumnname = "Name";
Also, you need to remember that this will set the variable to the new value for all future uses, until the value is set again.
Shortcuts usually aren't...