I would like to do the following. Log into a website, click a couple of specific links, then click a download link. I'd like to run this as either a scheduled task on windows or cron job on Linux. I'm not picky about the language I use, but I'd like this to run with out putting a browser window up on the screen if possible.
相关问题
- How to use VBA or Powershell to export lists from
- How to trigger a click on a chrome extension butto
- driver.quit() does not close browser windows
- Automation support for Visual Basic 6 ListView
- Azure Key Vault access from ARM Template
相关文章
- Reading data from Excel in Haskell
- Toad: 10.6: Seek clear instructions on automating
- Need to mock google OAuth2 service
- Python | PhantomJS not clicking on element
- How to compare two images in Robot Framework
- Automate Connect-AzureAD using powershell in Azure
- How can I test performance of my web app at differ
- Automation testing tool for Regression testing of
.NET contains System.Windows.Forms.WebBrowser. You can create an instance of this, send it to a URL, and then easily parse the html on that page. You could then follow any links you found, etc.
I have worked with this object only minimally, so I'm no expert, but if you're already familiar with .NET then it would probably be worth looking into.
Node.js with YUI on the server. Check out this video: http://www.yuiblog.com/blog/2010/09/29/video-glass-node/
The guy in this video Dav Glass shows an example of how he uses node to fetch a page from Digg. He then attached YUI to the DOM he grabbed and can completely manipulate it.
If you use PHP - try http://mink.behat.org/
Also you can use Live Http Headers (Firefox extension) to record headers which are sent to site (Login -> Links -> Download Link) and then replicate them with php using fsockopen. Only thing which you'll probably need to variate is the cookie's value which you receive from login page.
Check out twill, a very convenient scripting language for precisely what you're looking for. From the examples:
There's also a Python API if you're looking for more flexibility.
Except for the auto-download of the file (as that is a dialog box) a win form with the embedded webcontrol will do this.
You could look at Watin and Watin Recorder. They may help with C# code that can login to your website, navigate to a URL and possibly even help automate the file download.
YMMV though.