AutomaApp / automa

A browser extension for automating your browser by connecting blocks
https://www.automa.site
Other
11.43k stars 1.23k forks source link

Im having the same issue on handle download block as in this discussion #1518

Closed lkkfarcap closed 10 months ago

lkkfarcap commented 11 months ago

Discussed in https://github.com/AutomaApp/automa/discussions/1517

Originally posted by **sparkls0** November 8, 2023 Hey pals, I am really confused about the new system regarding the handle download The only thing I don't get and I'm not able to do, is retrieve the /file/path inside a variable. I've followed Automa's docs guidelines ![CleanShot 2023-11-07 at 23 22 57](https://github.com/AutomaApp/automa/assets/48011728/db4fa55b-5e9d-47d6-a053-46205b7579b1) But wait, what? That's not working, am I missing something? So here's what I did, I targeted my picture using an annoying HTML formula (to not rely on dynamical class), put that in selector in the save assets. It contains the src containing the picture url. ![CleanShot 2023-11-07 at 23 23 59@2x](https://github.com/AutomaApp/automa/assets/48011728/98922862-c656-4dc0-ba3d-f2020c891a50) Here is it, just for the sake of my example : div[role="figure"][aria-label^="Selected: Variation"] > div[tabindex="0"] > span > img So, I saved items's download IDs, assigned to a variable, gave that variable to the Handle Download's 'File download ID' ![CleanShot 2023-11-07 at 23 25 03@2x](https://github.com/AutomaApp/automa/assets/48011728/fe8cd825-a944-4fa9-ade0-466bedf4ca9f) And dang, got the error 'Download id is not a number', right, it's not, it is an array containing number ![CleanShot 2023-11-07 at 23 25 42](https://github.com/AutomaApp/automa/assets/48011728/5910adff-b3c4-4a2d-af5c-517b62dfc455) So, what am I missing?
Kholid060 commented 10 months ago

You need to add .0 at the end of picture_path in the Handle Download block. For example {{variables@picture_path.0}}

GmwEnterprise commented 9 months ago

Snipaste_2023-12-20_17-13-26 Version: 1.28.24

I want to obtain the path to download the file, but I cannot obtain it using the "Handle Download Block" component, and the variables are not printed. I am very confused. Snipaste_2023-12-20_17-13-57 Snipaste_2023-12-20_17-14-10

xiaoquqi commented 1 month ago

Seems the same problem when I try to do the same thing