Implemented a better alternative for retrieving contextualized parameters in Casper#evaluate()
Now as an alternative, CasperJS injects a `__casper_params__` Object instance containing all the parameters you passed: casper.evaluate(function() { document.querySelector('#username').value = __casper_params__.username; document.querySelector('#password').value = __casper_params__.password; document.querySelector('#submit').click(); }, { username: 'Bazoonga', password: 'baz00nga' })
Showing
2 changed files
with
38 additions
and
16 deletions
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment