Tag: microsoft edge

检查浏览器是否为chrome或edge

我目前的网站仅在Chrome浏览器中运行,为此,我已按以下方式检查 if (Request.Browser.Browser == “Chrome”) { // Allow } 但对于Edge来说 ,它仅仅作为”Chrome”返回。 如何仅允许从Chrome浏览器进行访问?

带有Microsoft Edge驱动程序的Selenium永远不会完成初始化

我正在使用Selenium的C#绑定,并尝试在Microsoft Edge中进行简单的自动化测试。 class Program { static void Main(string[] args) { EdgeOptions options = new EdgeOptions(); options.PageLoadStrategy = EdgePageLoadStrategy.Eager; RemoteWebDriver driver = new EdgeDriver(); driver.Url = “http://bing.com/”; } } 但程序停止了EdgeDriver的初始化,边缘浏览器启动但url永远不会变为“bing.com”。 还有其他人经历过这个吗?

使用System.Windows.Automation读取Edge Browser Title和Url

我正在尝试从Microsoft EDGE浏览器中读出TITLE和URL。 最好使用System.Windows.Automation执行此操作,因为代码库已经将此用于其他问题。 是否可以使用System.Windows.Automation? 如何访问URL? 我现在这么远: AutomationId “TitleBar” ClassName “ApplicationFrameWindow” Name = [string] => Reading out this element gives me the TITLE => Walking it’s children, I find the item “addressEditBox”: AutomationId “addressEditBox” ClassName “RichEditBox” Name “Search or enter web address” => I always get back the string “Search or enter web address” => This […]

Windows 10上的MSHTML DLL

我有一个使用Smith Html编辑器的C#解决方案(我正在开发使用它的主项目,所以我对这个库不太了解),它引用了MSHTML。 这工作正常,直到我升级到Windows 10,它再也找不到MSHTML了。 我可以直接引用GAC文件夹上的DLL,它会停止抱怨并因此构建,但它会得到一些与编辑器无关的实例化运行时错误。 经过一番研究后发现MSHTML已逐步退出Windows 10,因为它现在使用的是EdgeHTML。 有谁知道我怎么能绕过这个? 该解决方案仍适用于Windows 7。