Page 1 of 1

What events are triggered when using the ExecuteJavaScript method?

Posted: Fri Nov 10, 2017 1:40 pm
by blueflagbj
Hello,
What events are triggered when using the ExecuteJavaScript method?
like this :

chrm1.browser.MainFrame.ExecuteJavaScript('document.getElementById("v71clickCourseMore").click();', 'about:blank', 0);

onLoadingStateChange and onLoadEnd events are not triggered

Re: What events are triggered when using the ExecuteJavaScript method?

Posted: Fri Nov 10, 2017 2:23 pm
by salvadordf
Hi,

That depends on the element you are clicking. That element could have javascript code for the click event that does something else than loading a different web page. Maybe it starts a file download or it creates a new popup window, a new tab...

It could trigger OnBeforeDownload, OnBeforeBrowse, OnOpenUrlFromTab, OnProtocolExecution...

Try to click that element in your regular web browser and use the inspector to find out what it does.