GVKun编程网logo

Headless_ie_driver启动Internet Explorer时发生意外错误。IELaunchURL()返回HRESULT 80070012(“没有其他文件。”)

9

如果您想了解Headless_ie_driver启动InternetExplorer时发生意外错误。IELaunchURL和返回HRESULT80070012的知识,那么本篇文章将是您的不二之选。我们

如果您想了解Headless_ie_driver启动Internet Explorer时发生意外错误。IELaunchURL返回HRESULT 80070012的知识,那么本篇文章将是您的不二之选。我们将深入剖析Headless_ie_driver启动Internet Explorer时发生意外错误。IELaunchURL的各个方面,并为您解答返回HRESULT 80070012的疑在这篇文章中,我们将为您介绍Headless_ie_driver启动Internet Explorer时发生意外错误。IELaunchURL的相关知识,同时也会详细的解释返回HRESULT 80070012的运用方法,并给出实际的案例分析,希望能帮助到您!

本文目录一览:

Headless_ie_driver启动Internet Explorer时发生意外错误。IELaunchURL()返回HRESULT 80070012(“没有其他文件。”)

Headless_ie_driver启动Internet Explorer时发生意外错误。IELaunchURL()返回HRESULT 80070012(“没有其他文件。”)

我正在尝试运行一个简单的无头Web浏览器;

from selenium import webdriverfrom selenium.webdriver.common.keys import Keysdriver = webdriver.Ie("headless_ie_selenium.exe")driver.get("www.google.com")print(driver.title)

我得到:

selenium.common.exceptions.SessionNotCreatedException: Message: Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070012 (''There are no more files.'') for URL ''http://localhost:65393/''

我试过但没用的东西:

1:

from selenium.webdriver.common.desired_capabilities import DesiredCapabilitiescaps = DesiredCapabilities.INTERNETEXPLORER.copy()caps[''ie.ensureCleanSession'']= Truedriver = webdriver.Ie("headless_ie_selenium.exe",capabilities=caps)

2:所有Internet选项安全设置处于同一级别,并且都选中了“启用保护模式”;

3:搜索要删除的C:\ Program文件夹,但是没有任何内容。

注意 :相同的代码对于普通的网络驱动程序(IEDriverServer.exe)可以正常工作,当我手动打开
headless_ie_selenium.exe时 ,它将启动:

Selenium driver found at: path..\IEDriverServer.exeStarted InternetExplorerDriver server (32-bit)3.8.0.0

答案1

小编典典

您所看到的错误说明了一切:

selenium.common.exceptions.SessionNotCreatedException: Message: Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070012 (''There are no more files.'') for URL ''http://localhost:65393/''

如果您访问Release Pageheadless-selenium-for-winReleaseNotesheadless-selenium-for-winv1.4
它明确提到了以下情况:

  • 支持Firefox和Chrome
  • 无头桌面不再启动Windows资源管理器。
  • 创建无头桌面后,desktop_utils.exe学会了不运行explorer.exe。

因此,无法使用 headless_ie_selenium.exe* 初始化 Internet Explorer*


更新:

按您的评论Are there any alternatives to open IE and run it in background viaselenium with mouse/keyboard inputsAnswer

Github线程中的@JimEvans Headless IE with selenium not working on Windowsserver 明确提到:

The IE driver does not support execution without an active, logged-indesktop session running. You''ll need to take this up with the author of thesolution you''re using to achieve "headless" (scare quotes intentional)execution of IE.

他还补充说:

Mouse and keyboard simulation won''t work without an active session. It''sa browser limitation, not a driver limitation.

asp.net – System.Runtime.InteropServices.COMException功能不正确. (HRESULT异常:0x80070001)

asp.net – System.Runtime.InteropServices.COMException功能不正确. (HRESULT异常:0x80070001)

我在ASP.net中有一个Asynchronus IHttpHandler,我在ELMAH捕获中看到了这个异常错误.

Windows Server 2008 R2 Web Edition
IIS 7.5
ASP.NET
.NET 4.0运行时
在站点上运行HTTP.

谁能对这一个有所了解?谷歌列出了2008年左右的一些结果,关于.NET 2.0中关于在请求体的Read()函数期间断开HTTP的错误.

堆栈跟踪

System.Web.HttpException (0x80004005): An error occurred while communicating with the remote host. The error code is 0x80070001. ---> System.Runtime.InteropServices.COMException (0x80070001): Incorrect function. (Exception from HRESULT: 0x80070001)

Server stack trace: 
    at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result,Boolean throwOndisconnect)
    at System.Web.Hosting.IIS7WorkerRequest.ReadEntityCoreSync(Byte[] buffer,Int32 offset,Int32 size)
    at System.Web.HttpRequest.GetEntireRawContent()
    at System.Web.HttpRequest.get_InputStream()
    at MyHandler.ProcessRequest(HttpContext context)
    at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md,Object[] args,Object server,Int32 methodPtr,Boolean fExecuteInContext,Object[]& outArgs)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md,Object[]& outArgs)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg,IMessageSink replySink)

解决方法

这是IIS7的基础非托管层(webengine.dll)报告的错误.在一些谷歌搜索后,最相关的线程似乎表明这是由于网卡驱动程序配置( TCP Offloading)的错误.

见:An error occurred while communicating with the remote host. The error code is 0x80TCP Offloading1

Docker Volume-未处理的异常:访问被拒绝 (来自HRESULT的异常:0x80070005(E_ACCESSDENIED))

Docker Volume-未处理的异常:访问被拒绝 (来自HRESULT的异常:0x80070005(E_ACCESSDENIED))

我知道了。

问题是,当您在Windows中使用Docker Volumes时,您需要专门为Docker提供访问卷位置的权限。 就我而言该docker-compose.yml文件和卷位于D:驱动器中。 enter image description here

您需要授予Docker访问此文件夹的权限。

  1. 转到 Docker设置,并导航至资源标签和该标签下的文件共享,然后单击 + 按钮。 enter image description here

  2. 在随后出现的选择文件夹对话框中;选择导航到文件夹,然后点击选择文件夹enter image description here

  3. 点击应用并重新启动 enter image description here

重启Docker之后;使用 docker-compose up 再试一次,此问题已解决。是的!!!!!

getElementsByClassName()在旧的Internet Explorer(如IE6,IE7,IE8)中不起作用

getElementsByClassName()在旧的Internet Explorer(如IE6,IE7,IE8)中不起作用

如下代码:

var borderTds = document.getElementsByClassName(''leftborder'');

在Internet Explorer 6、7和8中给我一条错误消息:

对象不支持此方法

如何在这些浏览器中按元素类别选择元素?

我宁愿不使用JQuery。

答案1

小编典典

此解决方案可能会有所帮助。这是使用getElementsByClassName纯javascript实现的自定义函数,可在IE中使用。

本质上,此脚本正在执行的工作是一个接一个地探测所有可能的选项,并选择可用的最佳选项。这些选项是:

  1. 本机document.getElementsByClassName功能。
  2. document.evaluate 函数,该函数允许评估XPath查询。
  3. 遍历DOM树。

当然,第一个是性能最佳的,但是后者应该随处可用,包括IE 6。

页面上也提供了用法示例,如下所示:

getElementsByClassName("col", "div", document.getElementById("container"));

因此该函数允许使用3个参数:类(必需),标签名称(可选,如果未指定,则搜索所有标签),根元素(可选,如果未指定,则为文档)。

Headless_ie_driver启动Internet Explorer时发生意外错误IELaunchURL()返回HRESULT 80070012(“没有其他文件”)

Headless_ie_driver启动Internet Explorer时发生意外错误IELaunchURL()返回HRESULT 80070012(“没有其他文件”)

我正在尝试运行一个简单的无头Web浏览器;

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Ie("headless_ie_selenium.exe")
driver.get("www.google.com")
print(driver.title)

我得到:

selenium.common.exceptions.SessionNotCreatedException: Message: Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070012 ('There are no more files.') for URL 'http://localhost:65393/'

我试过但没用的东西:

1:

from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
caps = DesiredCapabilities.INTERNETEXPLORER.copy()
caps['ie.ensureCleanSession']= True
driver = webdriver.Ie("headless_ie_selenium.exe",capabilities=caps)

2:所有Internet选项安全设置处于同一级别,并且都选中了“启用保护模式”;

3:搜索要删除的C:\ Program文件夹,但是没有任何内容。

注意 :相同的代码对于普通的网络驱动程序(IEDriverServer.exe)可以正常工作,当我手动打开
headless_ie_selenium.exe时 ,它将启动:

Selenium driver found at: path..\IEDriverServer.exe
Started InternetExplorerDriver server (32-bit)
3.8.0.0

今天关于Headless_ie_driver启动Internet Explorer时发生意外错误。IELaunchURL返回HRESULT 80070012的分享就到这里,希望大家有所收获,若想了解更多关于asp.net – System.Runtime.InteropServices.COMException功能不正确. (HRESULT异常:0x80070001)、Docker Volume-未处理的异常:访问被拒绝 (来自HRESULT的异常:0x80070005(E_ACCESSDENIED))、getElementsByClassName()在旧的Internet Explorer(如IE6,IE7,IE8)中不起作用、Headless_ie_driver启动Internet Explorer时发生意外错误IELaunchURL()返回HRESULT 80070012(“没有其他文件”)等相关知识,可以在本站进行查询。

本文标签: