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

Using integer value from JavaScript outputs results in a deserialization error #1788

Closed
merveeyenice opened this issue Jul 11, 2024 · 4 comments · Fixed by #1997 or #2023
Closed

Using integer value from JavaScript outputs results in a deserialization error #1788

merveeyenice opened this issue Jul 11, 2024 · 4 comments · Fixed by #1997 or #2023
Assignees
Labels
bug Something isn't working js Related to JavaScript support maestro cli Related to the command-line Maestro tool P2 Important and valid issues not at the top of the work list

Comments

@merveeyenice
Copy link

merveeyenice commented Jul 11, 2024

Describe the bug
When passing paramaters, outputs are passed as strings so this does not make possible to use speed and timeout values as parametric in scrollUntilVisible command.

To Reproduce
I would like to pass speed and timeout value for scrollUntilVisible command from a .js file called "contants.js".

  1. Start the simulator
  2. Run maestro test ...
  3. The Flow fails at parsing file and gives this error:
Cannot deserialize value of type int from String "${output.speed.slow_speed}": not a valid int value

Expected behavior

I need to pass int values as parameter.

Workspace (if applicable)

.maestro/test.yaml

appId: appId
---
- runScript: constants.js
- launchApp
- scrollUntilVisible:
    element:
      id: ${output.favorites.imageViewVariantPickerArrow}
    direction: DOWN
    speed: ${output.speed.slow_speed}
    timeout: ${output.speed.long_timeout}

.maestro/constants.js

output.speed = {
  slow_speed: 50,
  default_speed: 70,
  fast_speed: 80,
}
@merveeyenice merveeyenice added the bug Something isn't working label Jul 11, 2024
@bartekpacia
Copy link
Contributor

bartekpacia commented Jul 11, 2024

I confirm this issue. I just reproduced it.

This should be fixed. It's on our backlog, but if you'd like to have it faster, we're always excited to see your contributions!

@bartekpacia bartekpacia added the maestro cli Related to the command-line Maestro tool label Jul 11, 2024
@bartekpacia bartekpacia changed the title Passing int value parameter Using integer value from JavaScript outputs results in a deserialization error Jul 11, 2024
@bartekpacia bartekpacia added P2 Important and valid issues not at the top of the work list js Related to JavaScript support labels Aug 15, 2024
@boranfrkn
Copy link
Contributor

Can you assign to me Bartek?

@bartekpacia
Copy link
Contributor

Sure, assigned! Thanks a ton :)

Copy link

github-actions bot commented Sep 8, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.
Thank you for helping keep us our issue tracker clean!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working js Related to JavaScript support maestro cli Related to the command-line Maestro tool P2 Important and valid issues not at the top of the work list
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants