I can't pass arguments to function passed to page.evaluate. I am trying to submit form.
data1 = "Textsample"; page.evaluate(function(data1) { var form = document.getElementById ("MyForm"); form.data.value = data1; form.submit(); }); But when I'am taking screenshot of page the data field is filled with "undefined". What am I doing wrong and how to fix it?