Forum Discussion

bo_roop's avatar
bo_roop
Contributor
7 years ago

How can I capture the displayed edge browser title (WndCaption)?

I have an existing keyword test that maximizes a browser based upon its WndCaption... all browsers besides Edge match the displayed tab's title. Edge however returns a WndCaption of "Microsoft Edge" instead of the Google title.

 

Google Tab

Is there a setting I can change to get this working again so I don't have to update NameMapping and my existing tests?

 

Thanks!

6 Replies

    • bo_roop's avatar
      bo_roop
      Contributor

      Thanks. I'm trying to get it to work the way it used to work in IE, Firefox and chrome... without modifying existing functionality if possible.

       

      I see that your way works but do you know of a way to get Edge & TestComplete to work together as the other browsers do?

       

      FWIW, Windows also displays "Google - Microsoft Edge" when Alt+Tabbing between windows.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Edge is it's own monster.  Honestly, I don't know.  However, even for your existing browser, that code should work. That contentDocument.title is part of the actual HTML document for the page so it is a global property available no matter what the browser.  If your intent is to work in multiple browsers, that would be the best practice to follow.

    • bo_roop's avatar
      bo_roop
      Contributor

      Yes, the browser is configured properly and TestComplete settings have been applied. The browser is recognized as Edge so I know it's working.

       

      It's just the difference in the WndCaption that I'm noting. :(