Closed NikolaSimsic closed 16 minutes ago
I am trying to pass the parameters to the javascript file exactly as it is described here.
This is the code:
- runScript: file: checkText.js env: elementId: logBox expectedText: random
And checkText.js:
const elId = elementId; const expectedTxt = expectedText; console.log("out log", elId, expectedTxt);
After the execution, result is without values being read:
║ Log messages: ║ out log ║
It should be possible to pass the env values as a parameters to the js file.
It is a native app, execution on Android device. But this does not matter for the case.
M1 MacBook Air arm64 macOS Sequoia 15.1. openjdk 17.0.9 2023-10-17 OpenJDK Runtime Environment Homebrew (build 17.0.9+0)
1.39.1
Homebrew
No response
MA-2548 Run JavaScript - passing a parameter does not work as described in docs
Logging only supports a single parameter right now
https://maestro.mobile.dev/advanced/javascript/logging
Gonna close this for now. Please feel free to reopen if that doesn't solve your problem.
Is there an existing issue for this?
Steps to reproduce
I am trying to pass the parameters to the javascript file exactly as it is described here.
This is the code:
And checkText.js:
Actual results
After the execution, result is without values being read:
║ Log messages:
║ out log
║
Expected results
It should be possible to pass the env values as a parameters to the js file.
About app
It is a native app, execution on Android device. But this does not matter for the case.
About environment
M1 MacBook Air arm64 macOS Sequoia 15.1. openjdk 17.0.9 2023-10-17 OpenJDK Runtime Environment Homebrew (build 17.0.9+0)
Logs
Logs
``` ```Maestro version
1.39.1
How did you install Maestro?
Homebrew
Anything else?
No response