Replies: 7 comments 2 replies
-
Hi @akagupta9! I suggest you that when the file picker or gallery app is opened, you should dump the native view hierarchy and inspect the It'd be helpful if you attached some videos and screenshots of how your app and file picker/gallery look like :) |
Beta Was this translation helpful? Give feedback.
-
Hello, I was playing around with patrol for couple last days. I was not able to successful use tap method to close permissions popups (Location always allow, notifications and motion permissions). The server crashed in my case. Our main app view is map, so it found plenty of map related objects (like POI and stuff) and probably just couldn't handle it. So to workaround it I just added more commands to the patrol server and dart part of the lib, to find explicitly buttons by text. It worked on iOS, didn't have time to test on Android side but should work the same way. Unfortunately communication was re-written to grpc so I won't made any PR soon. It would be lovely if someone could write more generic method to tap on alerts. Currently, it's mapping between command and text on the alert. Small change to the code that can get any text along with the command would resolve the problem and allow tap on any alerts, without need to add explicitly per type command (of course, in case, where tap method is not working). Something like this (+ dart part, grpc and android implementation) should work
|
Beta Was this translation helpful? Give feedback.
-
Hi @pawlowskim, thanks a lot for the feedback! We appreciate it a lot 💙
That's because of how the func tap(on text: String, inApp appId: String) {
runAction("tapping on \(text)") {
let app = XCUIApplication(bundleIdentifier: appId)
app.descendants(matching: .any)[text].firstMatch.tap()
}
} I guess that you were using it like this on the Dart side: await $.native.tap(Selector(text: 'Allow')); which was implicitly using the await $.native.tap(
Selector(text: 'Allow'),
appId: 'com.apple.springboard',
); Anyway, you shouldn't have to work around the permission handling feature not working. Thanks for your code snippet, and sorry that you encountered the bug. I'll try to fix this today :) |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback, I will try passing the launcher id for tap event. Hope it works 🤞 |
Beta Was this translation helpful? Give feedback.
-
@pawlowskim How'd it go? :) |
Beta Was this translation helpful? Give feedback.
-
@bartekpacia AFAIR it didn't worked. But meantime, communication was rewritten to grpc and more native buttons texts were added to existing click events, and that worked. |
Beta Was this translation helpful? Give feedback.
-
@bartekpacia I am also trying to do the same thing with trying to automate uploading an image in android. The problem I have is that I don't see any text so I can use $.native.tap, there is only some icons, firstly a camera icon to take the picture and than a tick icon to approve the photo taken. This is what I am trying to automate. Any suggestions? |
Beta Was this translation helpful? Give feedback.
-
Scenario :
I have one scenario of updating profile picture. To automate that I have 2 requirements -
For requirement 1, I can see in document and we have example test also. can you please let me know for requirement 2, what all steps I have to follow, or code snippet for refrence.
Beta Was this translation helpful? Give feedback.
All reactions