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
114 additions
and
36 deletions
-
Please register or sign in to post a comment