I’m currently trying to move over a screen-scraping program (c# forms application) to a WCF service.
The screen-scraping program uses WebBrowser to grab info off several pages for which there is no API. I would like to know if you can run WebBrowser in a service let alone a form. I’m currently developing on XP to be release on Server 2003.
Currently when running unit test, I can only see the WebBrowser if it was made on the “Unit Test” side and even then I need to manually pop up MessageBox‘es to get WebBrowser to stop from not navigating with a blank screen.
The program is being moved and split up since we are having multi-threading issues.
You would be better off using a headless browser like Phantom.js: http://www.phantomjs.org/. It offers significant features and has no problem being executed wherever you need like a regular command – line program.