Powershell中的Open Browser刚刚停止工作 [英] Open Browser in Powershell just stopped working

查看:114
本文介绍了Powershell中的Open Browser刚刚停止工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在过去的几周中,我一直在创建Windows Powershell脚本来自动化Web UI测试.直到今天我运行它们并获得一百万个例外之后,它们的运行情况都很好.我试图手动创建InternetExplorer对象:

I've been creating Windows Powershell scripts to automate Web UI Testing for the past couple of weeks. They have all worked fine until today I ran them and got a million exceptions. I tried to manually create an InternetExplorer object:

$ie = new-object -com "InternetExplorer.Application"

我收到此错误:

New-Object : Creating an instance of the COM component with CLSID {0002DF01-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 800704a6.
At line:1 char:17 + $ie = new-object  <<<< -com "InternetExplorer.Application"

这是我一次又一次用来运行InternetExplorer的完全相同的代码.为什么它突然停止工作,我该如何解决?

This is the exact same code I have been using over and over to run InternetExplorer. Why has it suddenly stopped working and how can I fix it?

推荐答案

很奇怪,该错误消息与此相对应:

Weird, that error message corresponds to this:

已经关闭系统 预定的. (来自HRESULT的异常: 0x800704A6)

A system shutdown has already been scheduled. (Exception from HRESULT: 0x800704A6)

您是否更新了IE或以其他方式安装了需要重新启动计算机的内容?

Did you update IE or otherwise install something requiring a machine reboot?

这篇关于Powershell中的Open Browser刚刚停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆