maestro icon indicating copy to clipboard operation
maestro copied to clipboard

[Feature Request] setLocation to accept external env variables

Open elcaptain opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe. Right now setLocation does not accept external env variables.

file.yaml:

appId: xxx
---
- launchApp
- waitForAnimationToEnd
- setLocation:
    latitude: ${lat}
    longitude: ${long}

run: maestro test -e lat=52.390568 long=-2.587910 file.yaml

error: Cannot deserialize value of type doublefrom String "${lat}": not a validdouble value (as String to convert)

Describe the solution you'd like I'd like setLocation to accept external env variables.

Describe alternatives you've considered I've tried wrapping the number in quotes but it did nothing: maestro test -e lat='52.390568' long='-2.587910' file.yaml

elcaptain avatar Oct 18 '23 13:10 elcaptain

me too

zereight avatar Nov 01 '23 07:11 zereight

same here

volkanakbayir avatar Mar 16 '24 10:03 volkanakbayir

Same here

dgreasi avatar May 01 '24 08:05 dgreasi

I have the feeling this is the case for all built-in parameters which aren't of type String. And it doesn't just affect external env variables, but env variables in general.

Doing something like

- launchApp:
    clearState: ${clearState}

results in a similar

Cannot deserialize value of type `java.lang.Boolean` from String "${ clearState }": only "true" or "false" recognized

ubuntudroid avatar May 02 '24 16:05 ubuntudroid

Same here. Also noticed if a string env value has a # in it (in my case it was the last char), it is ignored when being used.

Arron-Gill avatar May 03 '24 17:05 Arron-Gill

Thank y'all for creating the issue and chiming in.

There's already a PR for that, should land soon: #1769.

I'm going to close it as duplicate of https://github.com/mobile-dev-inc/maestro/issues/1765

bartekpacia avatar Jul 11 '24 01:07 bartekpacia