Share via

WebView2 automation testing

Lisa Yurchenko 0 Reputation points
2023-09-21T08:18:36.9033333+00:00

Hello,

I need an advice regarding WebView2 automation testing.

We have recently started a project which is a VSTO add-in with WebView2-based UI along with O365 add-in. Hence, we now have to consider automation testing for both apps on Desktop. Of-course, we can test both apps using native approach, but is there a way to use Selenium Web-Driver for this purpose?

I have tried this guide Automate and test WebView2 apps with Microsoft Edge WebDriver - Microsoft Edge Development | Microsoft Learn to connect to my WebView2 in Outlook add-in, but it doesn't seem to be working.

Please let me know if there are any suggestions.

Best regards

Outlook | Windows | Classic Outlook for Windows | For business
Microsoft Edge | Microsoft Edge development
Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.


1 answer

Sort by: Most helpful
  1. Roman Shulman 0 Reputation points
    2023-12-14T17:43:31.5+00:00

    That is possible to do, but you need to follow all the steps in the Microsoft guide https://learn.microsoft.com/en-us/microsoft-edge/webview2/how-to/webdriver. I have it working on my end but it does have glitches though.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.