Is it possible to interact with web browser from WinForm/WPF C# App?

Viewed 195

I would like to know if it's technically possible to develop a WinForm or WPF C# application that can interact with any web browser tab.

Let's imagine I have a Chrome web page with a web form. I would like to run a WinForm app and be able to point and select a web form field to get the data in it. Exactly like the F12 feature of a browser when you can use the Select feature and use your mouse to select a DOM element. As shown on attached screenshot.

enter image description here

F12 is a feature within the web browser, but how can I reproduce the same behaviour with an external custom WinForm/WPF application ?

Is it even possible?

2 Answers

I don't think there is a way to achieve what you want to do.
If there was, anyone could write a program to read all of the data you input into your browser, that would be a security nightmare.

yes, you can do it using Selenium.

Check this out: Selenium.

Related