I'm using ASP.NET WEBFORMS and Telerik and I want to export a document with Telerik components. I'm doing this with client export manager of Telerik https://demos.telerik.com/aspnet-ajax/client-export-manager/overview/defaultcs.aspx, and it works, but I need to render the entire DOM, then show to user, then user clicks on EXPORT button, and if I have more than one document it can be tedious for the user, so I want to export document without this preview, exporting the documents without user interaction. At this moment, I have seen this possible options:
- Tried to export the DOM before showing to user (in Render() event for example) but I can't execute this with JavaScript because the DOM is not fully rendered.
- Tried iText library, but this is not working with Telerik components (like graphics or grids)
The only thing on my mind right now is using something like https://phantomjs.org/ to automate the process where the user clicks the button automatically. Could someone tell me any other strategy that does not require a lot of programming time?
Edit:I tried Selenium to simulate the user interaction, but obviously when the file is downloaded it is saved on external navigator, there is a way to save it on the user's navigator?