There is a program with the WebBrowser component and a text field on the site that intercepts keydown. Before that I worked through focus and sendkeys, but the problem is that when switching to another window it stops working. After which he wrote the following command:
mainweb.Url = new Uri("javascript:" + "document.getElementById('double_your_btc_stake').value = '0.000002';" + "document.getElementById('double_your_btc_stake').dispatchEvent(new KeyboardEvent('keydown', {keyCode: 0x20}));");
But, unfortunately, this:
document.getElementById('double_your_btc_stake').dispatchEvent(new KeyboardEvent('keydown', {keyCode: 0x20}));
does not work in IE. In the IE console itself, writes "The command is not supported by the object.
Who can tell a software keydown emulation on a page element in a webbrowser?
UPD: I found this solution, IE takes it:
$(document.getElementById('double_your_btc_stake')).keydown();
but if you do this:
mainweb.Url = new Uri("javascript:$(document.getElementById('double_your_btc_stake')).keydown();");
then the result object is displayed in WebBrowser as [Object object], but you need to stay on the page.