wolfenrain / fluttium

Fluttium, the user flow testing tool for Flutter
https://fluttium.dev
MIT License
361 stars 10 forks source link

fix: Error When using `wait`, Fatal driver exception occurred: Expected a value of type 'int', but got one of type 'String' #366

Closed ahmednfwela closed 10 months ago

ahmednfwela commented 10 months ago

Description

when using wait shorthand action

- wait: 2000

I get this error:

 Fatal driver exception occurred: Expected a value of type 'int', but got one of type 'String'

or when I use this:

- wait:
  seconds: 2

I get

 Fatal driver exception occurred: Expected a value of type 'int', but got one of type 'Null'

looks like something is going horribly wrong when parsing integers, perhaps related to https://github.com/wolfenrain/fluttium/issues/365

Thithip commented 10 months ago

As the param file is YAML, you should be careful on indentation. I had same issues, but after some tests, I figure out that we need more space indentation for wait:

- wait:
    seconds: 2

And not:

- wait:
  seconds: 2

The seconds shouldn't be at the same level as wait.

Hope this help.

ahmednfwela commented 10 months ago

@Thithip Thanks a lot! that was indeed the fix

still the issue remains when using

- wait: 2000