You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在Selenium C#中移除Chromium Edge浏览器IE模式下的信息栏及解决意外关闭弹窗问题

Fixing Edge IE Mode Popups & Info Bars with Registry Edits (For IEDriver Selenium Tests)

Absolutely—since you're stuck using IEDriver (which can't send commands to the Edge browser shell), registry tweaks are the perfect workaround to suppress those persistent popups and info bars. Let’s break down targeted fixes for each issue you’re facing:

1. Disable the "Microsoft Edge Closed Unexpectedly" Crash Recovery Popup

This popup triggers when Edge detects an unexpected shutdown (super common in automated test environments). Here’s how to turn it off:

  • Open the Registry Editor (regedit.exe) as Administrator.
  • Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge
    • If the Edge key doesn’t exist, right-click Microsoft > New > Key, and name it Edge.
  • Right-click the Edge key > New > DWORD (32-bit) Value.
  • Name it RestoreOnStartup and set its value to 0.
  • Add another DWORD value named HideFirstRunExperience and set it to 1—this suppresses initial Edge setup prompts that might throw off your tests.

2. Suppress IE Mode Info Bars

The two info bars you’re seeing are likely compatibility or security prompts tied to IE Mode. Use these registry entries to block them:

Disable Compatibility View Info Bar

  • Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Main
  • Right-click Main > New > String Value.
  • Name it CompatibilityViewEnabled and set its value to 0.

Disable Security & General IE Mode Info Bars

  • Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Infobars
    • Create the Infobars key if it doesn’t exist.
  • Right-click Infobars > New > DWORD (32-bit) Value.
  • Name it AllowInformationBar and set its value to 0.
  • This blocks most default info bars in IE Mode, including those for blocked content or security warnings.

Critical Notes

  • Backup the Registry: Always export the relevant keys before making changes—this lets you revert if something goes wrong.
  • Restart Everything: These changes won’t take effect until you close all Edge instances and restart your Selenium test runner.
  • Global Impact: These tweaks apply to all Edge IE Mode sessions, not just your automated tests.

After applying these edits, run your tests again—those annoying popups and info bars should no longer interfere with your automation flow.

内容的提问来源于stack exchange,提问作者Shmulik b

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.29 16:08:12