Using TIdHTTP to click a button on web page - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Indy (https://www.atozed.com/forums/forum-8.html) +--- Forum: Indy General Discussion (https://www.atozed.com/forums/forum-9.html) +--- Thread: Using TIdHTTP to click a button on web page (/thread-2676.html) |
Using TIdHTTP to click a button on web page - admctfdotcom - 03-20-2022 Hi, I need to be able to programmatically click a Download CSV button here and save the file locally. https://www.nasdaq.com/market-activity/stocks/screener I used TIdHTTP previously for downloading files but not when the button click in involved. I have to admit i am not much into HTTP GET/POST stuff. Any help would be greatly appreciated. Thank you. RE: Using TIdHTTP to click a button on web page - rlebeau - 03-21-2022 (03-20-2022, 09:20 AM)admctfdotcom Wrote: I need to be able to programmatically click a Download CSV button here and save the file locally. Unfortunately, that page makes heavy use of CSS. The button in question does not appear to be inside of a traditional HTML webform. So, there is likely some backend scripting involved to handle the click. And when I do click on the button and try to watch the subsequent HTTP requests in the browser's debugger, I don't see an HTTP request that actually results in the CSV file being downloaded. I do see an initial HTTP request that responds with a compressed JSON, but after that, I don't know what the browser is doing to finish the download. Also, that initial request is using HTTP/2, which Indy does not support at this time. So, I couldn't tell you if/how it is possible to implement this particular download with Indy without more details. |