private async void button1_Click(object sender, EventArgs e) { var response = await browser.EvaluateScriptAsync("document.title"); if (response.Success) MessageBox.Show(response.Result?.ToString()); response = await browser.EvaluateScriptAsync("function add(a,b){ return a + b; }"); response = await browser.EvaluateScriptAsync("add(2,3)"); if (response.Success) MessageBox.Show(response.Result?.ToString()); }