0

I am new to Windows Forms and my core competency is testing. I am trying to build a tool using Windows Forms where we can launch the webpage using webview2 and then record the steps which the user performs on the webpage as a string. These steps can be used as steps to reproduce a defect.

In order to do this, I created a Windows Forms project, added webview2 to the form, and hardcoded a URL in it.

In Form1.cs I have added these methods:

private void webView2_Click(object sender, EventArgs e)
{
    // logic to capture the clicked element on the webpage.
}

private void webView2_MouseClick(object sender, MouseEventArgs e)
{
    // logic to capture the clicked element details on the webpage.
}   

However, after launching the application and clicking on a webpage rendered using webview2, none of the above methods gets triggered.

I also tried using the Cefsharp library, which didn't help this cause.

Vemula Dheeraj
  • 64
  • 1
  • 11
  • You want to rebuild Steps recorder: https://support.microsoft.com/en-us/windows/record-steps-to-reproduce-a-problem-46582a9b-620f-2e36-00c9-04e25d784e47 ? – rene May 13 '23 at 07:13
  • @rene Yes but for web applications, the Windows steps recorder doesn't provide the exact the element details of the web application. – Vemula Dheeraj May 13 '23 at 09:41

0 Answers0