I have a c# desktop app which connects to a site via a web browser control. The problem is I need to navigate to a specific section and download a excel file which is generated from a postback. I would like to either automate this process or bypass the file download dialog and save the file directly to a local drive.
Problem
The link is not a standard url. The site uses a postback script to get the file needed which then displays the file download dialog box. E.g. When you click on the button (javascript: postback) the file download dialog box is automatically loaded.
As stated I want to bypass the save options and automatically store the file in a predefined location. Any help would be much appreciated.
I find AutoIt http://www.autoitscript.com/site/autoit/ very useful for these kind of tasks. If you want to integrate it with your C# app, then you can call your AutoIt script via system calls. The difficulty is finding and following the link on the page, that will depend on how the page is laid out.
Related
I am dynamically creating Hyperlinks in an excel spreadsheet linking to a set of html pages also located on the same PC. The html pages load java script files. When clicking on the URL then the correct HTML page opens in the browser but as a side product I am also getting the following warning message:
My question is how to stop the information window popping up after clicking on the hyperlink in Excel. I looked at internet options and also at the Trust Center within Excel but was not able to successfully remove the information window.
There are two options to solve this without messing with security options.
Use the UNC path
change the link to call the file via a local webserver (e.g., IIS or Apache) on localhost
I'm using Xamarin.Dialog.Plugin.FilePicker to pick a text file, and it works for me, but when I want to save a text file using CrossFilePicker.Current.SaveFile(fileData), a file destination picker is not openning.
Any sugestion to save a file on a destination from my choose using Xamarin Forms?
I think the SaveFile() is not doing what you expect. When you look e.g. at the Android implementation, it only saves the file to the external storage folder for the app. It's not meant to open a "save file" requester.
The real solution depends on your use case. If you want to open the file in another application, you have to implement a ContentProvider and open a content:// URL that your app handles, by using Intent.ActionView or similar. There currently is no Xamarin Plugin for doing this.
My Question:
There are hundreds of unique URLs from where I have to download the zip file after clicking on the download icon. Is there any way to automate this process.
My process:
Open the unique web page URL,
Download icons appears.
Click on download icon to download the file.
Same process for rest of the pages.
Notes:
Each zip file has the different name.
Files are hosted in the secured server.
No access to directory folder.
Download icon position changes on every page.
Any chrome extension or fire fox ad don to solve this repeated task? Appreciate your help.
If you have download url list, then there are lots of add-ons that will help you download them, like DownThemAll
But if you do not have download url list, you will need to have a custom extension solution. Because, first extension needs to connect your server and retrieve download url before downloading the actual file. There needs to be Regular Expression difficulties which enforces custom extension solution.
I am creating one application in Liferay 6.2, it contains the Dynamic Data List which has Document & Media element associated with it. All work well but when user press Select button it open complex page for uploading the file. Which required lot of steps to upload single file.
Can this be simplified using hook; on pressing select it just open window to browse file as it is there in html, as currently functionality is confusing to client. And even file upload work automatically for guest users.
Any help will be highly appreciated, Thanks in advance.
I am using the WebBrowser control to browse local files and folders, but the control seems to be designed primarily to browse the Web (as its name implies).
I need to be able to do common tasks, like using the "Up one level" button, or put the control in "File Search" mode, get the active item, etc.
Is there a way to do these things using this control?
Is there a comprehensive documentation somewhere to explain local browsing using the WebBrowser?
Thanks all.
Here is a good intro that should help you get started on this. Most of the work with this dialog will be done by the browser, you need only to prompt it how to open the dialog.
I think you may be confusing the WebBrowser control with Windows Explorer.
If you want to browse around your local file system, then you need to add an Open File Dialog to the form containing the Web Browser control, then have a button of some kind open that dialog to locate the file to load into the WebBrowser control.