Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

What events are triggered when using the ExecuteJavaScript method?

Post Reply
blueflagbj
Posts: 8
Joined: Mon Jul 10, 2017 8:08 am

What events are triggered when using the ExecuteJavaScript method?

Post 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
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

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

Post 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.
Post Reply