0

I’m trying to use rect output with perform action command. For example:

query("* text:’Hello’", :y)
                                                                                        [
    [0] 226.0
]

Trying: perform_action('long_press_coordinate',200,y)

And getting the error:

RuntimeError: Action 'long_press_coordinate' unsuccessful: Can not deserialize instance of java.lang.String[] out of END_OBJECT token
 at [Source: java.io.StringReader@412a8480; line: 1, column: 61] (through reference chain: sh.calaba.instrumentationbackend.Command["arguments"])

Is it a syntax issue that I’m dealing with or is it much more? How do I ‘’turn’ the y value to a regular number?

Nir Ortal
  • 77
  • 12

1 Answers1

-1

I found code that works:

y=query("* text:’Hello’", :y)

perform_action('long_press_coordinate',200,y[0])

Hope it is helping.

Nir Ortal
  • 77
  • 12