Hi, I would like to ask a question #87
GuannanMeng
started this conversation in
General
Replies: 1 comment
|
Hi @GuannanMeng Sorry, I don't have idea on this. I'll see if there's any way to do this when I've some time. I'll update here If I get something. If you found the solution, please update here. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi, I want to ask a question about appium. It may not be related to appiumwizard. My project is based on wdio+appium. I want to add pictures or videos to the iPhone's Photos app on iOS devices through automation. But I found that XCUITest does not have a related API. I searched for related articles and it seems that I can only upload the file to the sandbox folder of Documents first. Then share the file to Photos by simulating a click. Then I tried to modify the wda project. I added a method. And tried to pass
await driver.executeScript('mobile:addFileToPhotos', videoPath);to add videos to the Photos app.
But when executing it, it will prompt
2025-02-12T09:22:14.369Z WARN webdriver: WebDriverError: Method is not implemented when running "execute/sync" with method "POST" and args "mobile:addFileToPhotos" [0-0] 2025-02-12T09:22:14.369Z INFO webdriver: Retrying 3/5 [0-0] 2025-02-12T09:22:14.369Z INFO webdriver: [POST] http://127.0.0.1:4723/session/9000586d-49c2-49c1-abae-fa02f45c6dfb/execute/sync [0-0] 2025-02-12T09:22:14.369Z INFO webdriver: DATA { [0-0] script: 'mobile:addFileToPhotos', [0-0] args: [ [0-0] '/Users/mengguannan/TikTokVideos/fenping/output/UPLOADED/08201.mp4' [0-0] ] [0-0] }Here is the code:
[[FBRoute POST:@"/wda/addFileToPhotos"] respondWithTarget:self action:@selector(handleAddFileToPhotosCommand:)],`+ (id)handleAddFileToPhotosCommand:(FBRouteRequest *)request
{
NSString *filePath = request.arguments[@"filePath"];
}`
Is there any way to add pictures to Photos? Maybe it doesn't require modifying the wda project (I'm too sure, this is just a guess)
May I ask if you know anything about this. Could you help me solve this problem? Thank you very much.
All reactions