I need to write some tests using PhantomJS. Basically I need to submit forms, but to do this I need data that is stored in a MySQL database.
I'm thinking to use Python and call the PhantomJS from Python, but I don't know what is the best way to pass data to the PhantomJS script.
For example I can pass via commandline a JSON ?
$ phantomjs script.js "{first_name: 'Peter', last_name: 'Brown'}"
Please guide me on how to do this.