Code to simulate a users actions, such as logging in

Posted by Gortron on Programmers See other posts from Programmers or by Gortron
Published on 2011-01-17T22:58:31Z Indexed on 2011/01/17 23:00 UTC
Read the original article Hit count: 292

I've recently begun working on a PHP application, replacing another developer. I believed the application was using an API to communicate with a remote service but when I looked through the code I found that it was using a set of functions to actually log in, fill out forms and submit them as a user might do in a browser.

My intention is to replace this code, to use the services API instead. I've considered leaving the code as is and not replace it. It makes me wonder though is this a common practice in the software industry? To have a programme simulate a users actions in a browser to perform a set of actions? It feels to me that this is clever but poor programming, Have any other developers seen this?

© Programmers or respective owner

Related posts about programming

Related posts about php