browser independant download in web app

Ask general questions here.
sstowe
Posts: 62
Joined: Thu May 31, 2018 2:26 pm

browser independant download in web app

Post by sstowe » Tue Jul 03, 2018 8:30 pm

My app performs a function that includes exporting some stuff to a file. I am looking for a mechanism to save the file to the local user's disc and then get to it. I have no problem with file I/O in code. But I am looking for direction on how to get at the file. When I fiddle around with the export functionality in question, in IE, I get a what do you want to do with this file dialog which I could drive with Ranorex. But in Chrome, the file is added to a footer s[ace at the bottom of the browser window. I don't remember what other browsers do.

I am looking for any direction on how one would get a handle on files created by and download from a web app. Thoughts? Thanks.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3949
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: browser independant download in web app

Post by odklizec » Wed Jul 04, 2018 12:13 pm

Hi,

In my opinion, there is no GUI-based and browser independent way to download a file from web. The problem is, that each browser implements its own way of downloading files. But it should be possible to download a file (if you know its address) via code (with web requests). Check for example this post...
https://stackoverflow.com/questions/141 ... om-a-web-s
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

sstowe
Posts: 62
Joined: Thu May 31, 2018 2:26 pm

Re: browser independant download in web app

Post by sstowe » Mon Jul 09, 2018 9:12 pm

Thank you