C# - How to control chrome browser

2019-04-07 13:11发布

问题:

I wanted to make an application wherein you specify the name of the websites, your username and password and that application automatically logs in to all your accounts in the specified websites. I have done this using windows form application, using a web browser. But i wanted my application to open all these websites in chrome and log it in there. Plz Help

回答1:

I'd check out the chrome API failing that Look into getting a handle to the window through window API calls

But why not just a chrome extension?!? Miles simpler



回答2:

Have a look at Selenium WebDriver



回答3:

Doing a quick Google search for "chrome C# api" turned up a number of results I think you may find relevant.

I thought the following were particularly promising, if you're willing to accept a few concessions:

  • Automating Chrome Browser from C#
  • ChromeDevTools; a C# Library to interact with Chrome's Developer Tools
  • Chrome Debugging API