The system does not work well with iPads, which were being deployed to sales. A new modern iPad-savvy reporting UI for sales staff was wanted, but the data had to end up in the legacy system during the multi-year transition that would phase it out.
We wrote a Rails app for the backend, and a native iOS client that ran on the iPads. Real straightfoward, the client app sends JSON to the rails backend. Upon submission of a report, the rails app then used PhantomJS to log into the legacy system as the user in question, navigate throught the multiple-page process, manipulating the popups and checkboxes and textfields, and input the data into the legacy system just as if the user had sat down at a PC and done it themselves.
Kludgetastic, definitely, but without something like PhantomJS there'd be no way at all to get data into this legacy system programatically.