Hello everyone. Did someone manage to get this to work? There is no documentation on webview2 and also smartbear support doesnt seem to know how we can get this to work. We tried a lot of differen...
I've been looking into this, and learning about WebView2. I have a simple C# WebView2 forms application that displays a web site.
C# WebView2 form application
The Object Browser shows the following
Standard UI controls exposed
Enabling MSAA (TC -> Project Settings), exposes the controls of the application
Application controls exposed
Enabling UI Automation (TC -> Project Settings), exposes even more of the application
More controls exposed of the application
and also WebView2, including the UI controls within
WebView2 and all UI controls with
For this to work correctly, the appropriate flag settings needs to be enabled for WebView2 control within the application.
Using TC version
If you're using Selenium WebDriver, then you can use the following command (I haven't tested this)
var environment = await CoreWebView2Environment.CreateAsync(null, null, new CoreWebView2EnvironmentOptions("--remote-debugging-port=9222"));
await webView.EnsureCoreWebView2Async(environment);
I hope this helps, and gives you a starting point.
I expect Testcomplete to let me map the objects that are displayed inside of the webview2 windows like other cross browser enabled mappings (e.g. using xpath, css selectors and so on)
This does not work. Enabling UI Automation (TC -> Project Settings) doesnt let me do that and this also worked in earlier versions of testcomplete where there was no webview2 support.
Currently our only option is to make a selenium project which uses the remote debugging port and integrate it into the testcomplete testscripts.
I had no issues mapping the objects within WebView2. I've attached a little video, showing TC interacting with a control using aliases and performing a check-point
I was using that standard mapping, not XPath or CSS.
Unfortunately, I’m not able to test this scenario, as my Desktop license is key-based and my Web license is SmartBear ID-based. It’s either one or the other, I don’t have access to both Desktop and Web license.