Blob file downloads

804 views
Skip to first unread message

confusa

unread,
Dec 1, 2014, 6:17:23 PM12/1/14
to seleniu...@googlegroups.com
How can one interact with a link that downloads a csv using a blob? Since the browser handles the blob conversion it is not as simple as getting the href and doing a straight GET on it I don't think? Using the Java bindings. Blob links look like so:

<a download="url.csv" ng-click="export($event, row)" ng-href="blob:7b244932-856e-401b-bfa3-65c47c4dde94" href="blob:7b244932-856e-401b-bfa3-65c47c4dde94">Download</a>

PeterJeffreyGale

unread,
Dec 1, 2014, 7:05:17 PM12/1/14
to seleniu...@googlegroups.com
Web driver aims to emulates a real user, so, as always, the first and most important question is: how would a real user do it?

CH!NN@ K

unread,
Dec 2, 2014, 1:03:10 AM12/2/14
to seleniu...@googlegroups.com
Hi confusa, Fallow this URL. It is directly download to your system. Refer this link : http://techlearn.in/content/how-download-pdf-file-website

---
Thanks & Regards,
Purushotham Karimbedu,
Druapl Developer and QA Engineer,
Website for Selenium : http://techlearn.in


On Tue, Dec 2, 2014 at 5:35 AM, PeterJeffreyGale <peterjef...@hotmail.co.uk> wrote:
Web driver aims to emulates a real user, so, as always, the first and most important question is: how would a real user do it?

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f4953402-52aa-4732-8de5-567d324e79ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David

unread,
Dec 2, 2014, 5:10:35 PM12/2/14
to seleniu...@googlegroups.com
This is interesting, first time I've ever heard of such a type of link. So I looked it up online a bit.

As Peter mentions, the best/appropriate way to test it would be to use the browsers native download capability by clicking the link to do actual download, but that only works for certain browsers that support file download to preconfigured directory w/o prompting user to save the file, e.g. Firefox and maybe Chrome via browser profile config.

If you needed a cross platform approach, you would need to grab the link URL to download with HTTP GET request. But a blob link is different. I don't suppose there is a way to convert the blob value/link to an HTTP based URL?

I'm not familiar with javascript blobs, but I assume they are base64 encoded value of the actual content? Or something similar? In that case, you would just need to grab the blob value and somehow decode it back into it's source data/value, which is either text or binary data. You can then save the decoded data to file or just use it as is for text or binary data stream or byte array. The decoding is likely in javascript via the javascript blob APIs or in Java via some Java utility library for javascript blobs.
Reply all
Reply to author
Forward
0 new messages