0
How can I set id= with ' instead of " because if I try to run the script on chromeBrowser.Executescriptasync with the error id=""it, how can I do this?
html/javascript code
var x = '<label id="idteste">Testando' +
'</label></div>'
$('#labelhm p:first').html(x);
The problem is in the id="idteste" which has the "" and when it is put in the c# of the error.
I have tried "+"idteste"+" which takes out the error, but ai the error in the script saying id is not valid
The script is very large and has several {} so I can’t do it:
Exemplo:
chromeBrowser.ExecuteScriptAsync("id={}", "idteste");
Not even that:
chromeBrowser.ExecuteScriptAsync($"id={idteste}");
I need it to stay like this: 'idteste', does anyone know any solution? Thank you.
I got it, it’s just that what runs the script here does not accept the '', so I did a trick and it worked, but thanks.
– user92401
Ah got it, good that it worked. If you can share with us your solution there.
– Mateus Saggin