moon icon indicating copy to clipboard operation
moon copied to clipboard

Any Moon API to List Files in an Directory

Open code-with-v opened this issue 2 years ago • 10 comments

In Moon 1.x I've mounted one directory and as a part of my testing I just want to access the list of file which is getting downloaded in downloads directory of the browser pod. Since I just want to access the file size and the file name, I was wondering is there any api through which we can avoid downloading the file and can access the directory.

code-with-v avatar May 26 '22 08:05 code-with-v

@vivek-singh-thridsummit we have an API to get a list of files in ~/Downloads.

GET /wd/hub/session/{sessionId}/aerokube/download?json

vania-pooh avatar May 26 '22 15:05 vania-pooh

@vivek-singh-thridsummit we have an API to get a list of files in ~/Downloads.

GET /wd/hub/session/{sessionId}/aerokube/download?json

It's giving me following error :

{"value":{"error":"unknown command","message":"unknown command: unknown command: session/090fa41ea6e7df1d5b66474af2c3e939/aerokube/download?json","stacktrace":"#0 0x5597fbddba23 \u003Cunknown>\n#1 0x5597fb8a6e18 \u003Cunknown>\n#2 0x5597fb8f8124 \u003Cunknown>\n#3 0x5597fb8f7e87 \u003Cunknown>\n#4 0x5597fb87eac4 \u003Cunknown>\n#5 0x5597fb87f910 \u003Cunknown>\n#6 0x5597fbe0b16d \u003Cunknown>\n#7 0x5597fbe215bb \u003Cunknown>\n#8 0x5597fbe0ce75 \u003Cunknown>\n#9 0x5597fbe21e85 \u003Cunknown>\n#10 0x5597fbe0086f \u003Cunknown>\n#11 0x5597fb87e63b \u003Cunknown>\n#12 0x7fbfb7daf0b3 \u003Cunknown>\n"}}

code-with-v avatar May 27 '22 10:05 code-with-v

@vania-pooh Could you please let me know the API for Moongrid 1.x as while hitting above API, the error is observed unknown command

code-with-v avatar May 28 '22 18:05 code-with-v

Moon 2 (w3c): https://aerokube.com/moon/latest/#accessing-downloaded-files

Moon 1: https://aerokube.com/moon/1-latest/#_accessing_files_downloaded_with_browser

сб, 28 мая 2022 г., 21:56 vivek-singh-thridsummit @.***

:

@vania-pooh https://github.com/vania-pooh Could you please let me know the API for Moongrid 1.x as while hitting above API, the error is observed unknown command

— Reply to this email directly, view it on GitHub https://github.com/aerokube/moon/issues/327#issuecomment-1140313976, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKY23JCBL637IRZPNUUANLVMJT5XANCNFSM5XAF44IQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

aandryashin avatar May 28 '22 20:05 aandryashin

@aandryashin It's giving 404 not found for Moon 1.x (the session url is correct and the file name too)

image

code-with-v avatar May 28 '22 21:05 code-with-v

That means video was not recorded...

вс, 29 мая 2022 г., 00:55 vivek-singh-thridsummit @.***

:

@aandryashin https://github.com/aandryashin It's giving 404 not found for Moon 1.x (the session url is correct and the file name too)

[image: image] https://user-images.githubusercontent.com/102881870/170844005-ff27ccca-af17-4420-9bef-e323b6e70a3b.png

— Reply to this email directly, view it on GitHub https://github.com/aerokube/moon/issues/327#issuecomment-1140334452, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKY23JAOH6MNTYHPJF5BLDVMKI6VANCNFSM5XAF44IQ . You are receiving this because you were mentioned.Message ID: @.***>

aandryashin avatar May 28 '22 22:05 aandryashin

That means video was not recorded...

@aandryashin It's not recorded video, it's the file which is downloaded using chrome browser

code-with-v avatar May 28 '22 22:05 code-with-v

Moon 1:

https://aerokube.com/moon/1-latest/#_accessing_files_downloaded_with_browser

Moon 2: https://aerokube.com/moon/latest/#accessing-downloaded-files

чт, 26 мая 2022 г., 11:24 vivek-singh-thridsummit @.***

:

In Moon 1.x I've mounted one directory and as a part of my testing I just want to access the list of file which is getting downloaded in downloads directory

aandryashin avatar May 28 '22 22:05 aandryashin

Moon 1: https://aerokube.com/moon/1-latest/#_accessing_files_downloaded_with_browser Moon 2: https://aerokube.com/moon/latest/#accessing-downloaded-files чт, 26 мая 2022 г., 11:24 vivek-singh-thridsummit @.*** : In Moon 1.x I've mounted one directory and as a part of my testing I just want to access the list of file which is getting downloaded in downloads directory

@aandryashin

The Above Output is the same after following the link https://aerokube.com/moon/1-latest/#_accessing_files_downloaded_with_browser

I ensured the File is getting Downloaded in ~/Downloads Directory

image

But Still after using the API it's giving
image

code-with-v avatar May 28 '22 22:05 code-with-v

Please Note - (Automated Test) Code / (Manually) You: should download the file before the pod gets killed / Test execution completes.

Environment = Moon 2.0

To show download contents inside the Pod Downloads folder: https://website/wd/hub/session/chrome-100-0-51646abd-3b74-41d2-991d-b600db4362d5/aerokube/download

To download the file: https://website/wd/hub/session/chrome-100-0-51646abd-3b74-41d2-991d-b600db4362d5/aerokube/download/file_example_XLS_10.xls

Please let me know if this helps.

joshianand18 avatar Sep 14 '22 14:09 joshianand18