0
How can I insert a string c# in the script?
string teste = "testando";
chromeBrowser.ExecuteScriptAsync("$(document).ready(function() {alert({0})}); ", teste);
I tried this code but did not return anything
0
How can I insert a string c# in the script?
string teste = "testando";
chromeBrowser.ExecuteScriptAsync("$(document).ready(function() {alert({0})}); ", teste);
I tried this code but did not return anything
0
The script you are trying to execute is in the syntax of jquery, probably the page will not recognize this naturally, so I suggest you write pure javascript for this, an example would be to do so:
script = "document.addEventListener('DOMContentLoaded', function(){ alert('qualquer coisa'); });";
Still, if you want to use jquery, I suggest following the code of this link.
Browser other questions tagged javascript c# cefsharp
You are not signed in. Login or sign up in order to post.