Forum Discussion

logeshks's avatar
logeshks
New Contributor
2 years ago

onWebPageDownloaded(Web Testing event)is not working for Chrome and Edge

HI,

I have implemented few General events like onStartTest, onStopTest, which are working fine. When I tried to implement onWebPageDownloaded event, the event is not even getting triggered on a page load. Is there any change in Settings which I need to make for using this event. If you have any specific syntax for implementation, could you please share that.

 

Thanks in advance for your help

2 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    As it's mentioned, This event is fired only for the Internet Explorer web browser and web browsers based on the Microsoft WebBrowser control. It does not occur for the other supported browsers.

     

    Also, are you using a browser (and version), that's supported by TC?

    • logeshks's avatar
      logeshks
      New Contributor

      Hi,
      Yes, from Smartbear customer support team we got to know that onWebPageDownloaded event works for Chrome and Edge as well. Currently I am using the Chrome version 105 and TestComplete version 15.4.

       

      The following code snippet is provided by Customer support team.

      Sub OnWebPageDownloaded(Sender, URL)
      ' Handler code goes here
      End Sub

       

      Get the browser object
      Set browser = Sys.Browser("chrome")

       

      Assign the OnWebPageDownloaded event handler function
      browser.OnWebPageDownloaded = AddressOf OnWebPageDownloaded

       

      Could you please help me in implementing the highlighted step?