Can't get WebView2 Automation testing working.

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Posts: 3
Joined: Wed Sep 15, 2021 11:37 am

Can't get WebView2 Automation testing working.

Post by matthew.butler » Thu Mar 31, 2022 4:33 pm


The AUT I work on has recently migrated from CEFSharp to Microsoft Edge WebView2 to display some web content launched by the main application. I've been trying to get Ranorex to pick up elements in the browser as it used to when using CEFSharp, but I can't seem to get it instrumented correctly. I've tried launching the main .exe with remote debugging set to 8081 and I've tried making modifications to the applications code to get it working but none have worked yet.

Edit: Managed to connect to the hosted webpage with "localhost:8081" and I can see the port open when looking at netstat on the cmd prompt so looks like the porting is working fine. So now just looks like it's just ranorex not being able to identify the elements

I'd greatly appreciate any help from anyone,
Kind Regards,

User avatar
Ranorex Guru
Ranorex Guru
Posts: 7387
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Can't get WebView2 Automation testing working.

Post by odklizec » Thu Mar 31, 2022 7:49 pm


As far as I know, WebView2 is not yet supported by Ranorex. There is a ticket for this, but there are no details as of when it will be supported.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration