Executing JavaScript
If you need more flexibility and need to run custom JavaScript, you need to use the evaluate instruction.
If you want to run the code console.log('foo') on the webpage you need to use this JavaScript scenario:
JSON
1{2"instructions": [3{"evaluate": "console.log('foo')"}4]5}
💡 Good to know: The results of any evaluate instruction will be added to the evaluate_results key in the JSON response if json_response=True is used. You can read more about this here.