maestro
maestro copied to clipboard
maestro hierarchy doesn't work
I followed the instructions to install maestro
and the process completes correctly.
If I run maestro hierarchy
while the simulator is in the home page of iOS, I get a correct output
{
"attributes" : { },
"children" : [ {
"attributes" : {
"text" : " ",
"bounds" : "[0,0][375,667]"
},
"children" : [ ],
"clickable" : null
}, {
"attributes" : {
"text" : "Shortcuts",
"resource-id" : "Shortcuts",
"bounds" : "[19,28][96,115]"
},
"children" : [ ],
"clickable" : null
}, {
"attributes" : {
"text" : "Contacts",
"resource-id" : "Contacts",
"bounds" : "[108,28][180,115]"
},
"children" : [ ],
"clickable" : null
}, {
"attributes" : {
"text" : "Files",
"resource-id" : "Files",
"bounds" : "[199,28][263,115]"
},
...
}
However, If I run it while an app is running, it crashes with the following message
com.github.michaelbull.result.UnwrapException: kotlin.Unit io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason
at maestro.drivers.IOSDriver.contentDescriptor(IOSDriver.kt:155)
at maestro.ViewHierarchy$Companion.from-c1iYVAs(ViewHierarchy.kt:28)
at maestro.Maestro.viewHierarchy-prqvCes(Maestro.kt:271)
at maestro.cli.command.PrintHierarchyCommand.run(PrintHierarchyCommand.kt:39)
at picocli.CommandLine.executeUserObject(CommandLine.java:1919)
at picocli.CommandLine.access$1200(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2332)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2326)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2291)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2159)
at picocli.CommandLine.execute(CommandLine.java:2058)
at maestro.cli.AppKt.main(App.kt:88)
The app is nothing more than a textfield. Code for reference
struct ContentView: View {
@State private var text: String = ""
var body: some View {
TextField("Insert Text", text: $text)
}
}
I am using Xcode14 and the latest version of maestro. Any ideas on what the problem may be?