I wrote two programs. One on Delphi 2009, another on Visual Studio 2019 to view the same html page. I used the twebbrowser component (or webbrowser control). In both cases, clicking the button on the page in window of webbrowser does not work and the corresponding java script does not execute. The page displays a message that my browser is out of date. Attempts to press a button programmatically failed (nothing happens, there is no error either). But the button work in the Internet Explorer 11. The code of the button:
<div id="showAll" class="showAllClass block" onclick="showAll(1, this)">
<a href="javascript:void(0);">Show all</a>
</div>
The code for Delphi:
var
A : IHTMLElement3;
doc : IHTMLDocument3;
v : OleVariant;
begin
A := (MyWebbrowser.Document as IHTMLDocument3).getElementById('showAll') as IHTMLElement3;
v:=Unassigned;
(A as IHTMLElement3).FireEvent('onclick',v);
end;
The code for C#:
webBrowser1.Document.GetElementById("showAll").InvokeMember("onclick");