您所看到的错误说明了一切:
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 Page的
headless-selenium-for-win的
ReleaseNotes为
headless-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 inputs直
Answer是 无 。
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.
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)