Is it possible to use a dynamic file path on a runScript action? #1442
-
Hi, I'm trying to pass the language of the APP to the maestro execution with a parameter to load the strings for the clicks or the assertions. The same application could have different languages. My tries started focused on passing a dynamic value in the runScript action. I tried multiple things but it is not working. I can see the path that I want if I print it but it is not transformed when I use it in the file parameter. Some of my tries:
EXTRA INFO: Is any way to pass the file parameter a dynamic file path? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Can you try:
|
Beta Was this translation helpful? Give feedback.
Hmm this might be an issue with the way you're trying to load it within the env at the start of the file, or it might be that runFlow doesn't like the JS parameter
Perhaps you can achieve this within the flow with something like this? (I haven't tested):
If this doesn't work, then I'd be tempted to call out to a separate flow that has conditionals that loads the correct language file based on the parameter you've passed in, e.g.: