hi
i want apply multiple
ExecuteScriptAsync on my
ChromiumWebBrowserafter the first
ExecuteScriptAsync, i have the good result, but when i run another
ExecuteScriptAsync, the browser do not change
how can i retreive the
ChromiumWebBrowser context to apply my second
ExecuteScriptAsyncthanks
i'm using the
cefsharp offscreen sample; in
MainAsync function i have add this :
....................
await LoadPageAsync(browser);
// Click on radio button
string code_javascript = @"document.getElementById('ctl0_CONTENU_PAGE_EntrepriseFormulaireDemande_choixAnonyme').click();";
browser.ExecuteScriptAsync(code_javascript);
// click on validate button
code_javascript = @"document.getElementById('ctl0_CONTENU_PAGE_validateButton').click();";
browser.ExecuteScriptAsync(code_javascript);
await browser.GetSourceAsync().ContinueWith(taskHtml =>
{
string html = taskHtml.Result;
string namefile = ".\test.publics_test.html";
StreamWriter monStreamWriter = new StreamWriter(namefile);
// write html in a file
monStreamWriter.WriteLine(html);
monStreamWriter.Close();
});
....................