Jerryth
8 years agoOccasional Contributor
Using variables in expressions for drop down menus
I am trying to make selections from a drop down menu bar. (running against different translations so I can't use plain English text) Instead of saying a cryptic (which works correctly) w.MainM...
- 8 years ago
Basically, what you need to keep in mind is that the contents of your variables are the strings you are replacing. So, you need to make sure that the "Click" method, when the whole expression evaluates, looks like the string you want it to be.
In shankar_r's code, you have your first variable followed by an operator that concatenates that variable with the string '|'. That is then concatenated with your second variable.I'm not sure where the brackets are coming from that you're trying to use. Again, those are parts of the initial string. If that's the case, modify shankar_r's code like so:
w.MainMenu.Click('[' + ProjectSuite.Variables.mnuSetup + "|" + ProjectSuite.Variables.mnuConfigDisplayAndUnits + ']');