1

I want to fill submit form on a website page using cefSharp:

cefSharp1.ExecuteScriptAsync("document.getElementById('Author').value='Me'");

But button submit not active, because this form checks if keys have been pressed, there are attached events: main.keyup=onTextChange($event,index,id) how can i simulate call them? Thanks.

thess
  • 11
  • 1
  • You should add some more tags e.g. JavaScript to get help from a wider audience. – amaitland Apr 12 '20 at 03:10
  • amaitland done. thanks. – thess Apr 12 '20 at 13:21
  • You can try simulate a key press using something like https://stackoverflow.com/a/59113178/4583726 or execute some javascript to remove the validation entirely. Alternatively you can try sending individual key presses like https://github.com/cefsharp/CefSharp/blob/cefsharp/79/CefSharp.OffScreen.Example/Program.cs#L86 you need to ensure the browser has focus – amaitland Apr 12 '20 at 20:26
  • Your answer helped me. Big thanks friend! – thess Apr 15 '20 at 22:47
  • Great, you can post your own answer to help others. – amaitland Apr 15 '20 at 23:09

0 Answers0