-1

I need to fill a form using data from a CSV file. I was planning to use CURL+PHP to do it, but then I realized the form has several steps (one on each page), plus it uses javascript to fill hidden inputs. It is an ASP.NET form, so it has a lot of variables a postback, etc.

I am thinking now, to make a browser extension that would load the CSV file and without any more user input would fill the form, and advance from page to page filling up the form and then somehow wait for the form to finish processing, retrieve the output and restart the form.

I would like to repeat this for 500-600 times. The website in question does not provide an API so filling up forms is the only way.

Does this idea sound feasible, any other ideas?

1
  • 3
    (1) Make sure that you are legally allowed to access that site with bots. If so, the site owner may be prepared to help you. (2) If there's JavaScript on the page, just execute it. You can use Selenium or a remote-controlled Firefox to help you with this (In Perl, I'd use WWW::Mechanize::Firefox, I'm not sure what the PHP pendant would be).
    – amon
    Jan 31, 2014 at 12:23

1 Answer 1

2

Convert your CSV file into a Selenium script which is basically HTML and run inside your browser. (http://docs.seleniumhq.org/projects/ide/)

Not the answer you're looking for? Browse other questions tagged or ask your own question.