Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Can we have print statement in flow yaml #1745

Open
findms opened this issue May 16, 2024 · 3 comments
Open

[Feature Request] Can we have print statement in flow yaml #1745

findms opened this issue May 16, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@findms
Copy link

findms commented May 16, 2024

Is your feature request related to a problem? Please describe.
The problem is that we can not put logs after steps if it did passed or failed on console while running through tests folder where multiple flow files exist.
For example we use :
console.log("XYZ step passed")

Describe the solution you'd like
Something similar to console.log which accept string and print as it is.

@findms findms added the enhancement New feature or request label May 16, 2024
@Fishbowler
Copy link
Contributor

I was hunting around for another hobby contribution, but I'm not sure I fully understand this.

we can not put logs after steps if it did passed or failed on console

Are you talking about being able to log something after the flow has already failed?

@rasyid7
Copy link

rasyid7 commented May 20, 2024

you can use evalScript

- evalScript: ${console.log('Hello Word')}

it's stated here https://maestro.mobile.dev/api-reference/commands/runscript#console-logging

@findms
Copy link
Author

findms commented May 20, 2024

@rasyid7 this is being executed as javascript..not sure if we can simply print something in yaml. While running tests via folder this print via evalScript is not shown on console. It only shows the element due to which test fail. no print statement before that because this is a action for maestro to execute javascript.

To add more details
Lets say there are 10 lines of action in yaml and I am running tests via flows folder(where it contains all the test flows)
After 5th I have added evalScript to print that line 5th executed. If it failed on line 7th action due to any locator etc issue - console will not show the print on 5th it will show the fail on 7th with locator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants