【问题标题】:Create instance of Firefox or chrome in C#在 C# 中创建 Firefox 或 chrome 的实例
【发布时间】:2015-07-24 18:43:14
【问题描述】:

我可以在 C# 中创建 IE 实例

// start the browser
SHDocVw.InternetExplorer m_IExplorer = new SHDocVw.InternetExplorer();


// go to home page
m_WebBrowser = (SHDocVw.WebBrowser)m_IExplorer;

并在其事件中工作,例如 导航前 下载开始


我可以在 Firefox 或 chrome 中执行此操作并在此事件中工作

【问题讨论】:

    标签: c# google-chrome firefox


    【解决方案1】:

    你可以启动你想要的浏览器进程:

    Process.Start(@"%AppData%\..\Local\Google\Chrome\Application\chrome.exe", "url");
    

    但您无权访问事件。

    【讨论】:

    • 我认为你做不到。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-11-17
    • 2022-12-22
    • 2011-07-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-20
    相关资源
    最近更新 更多