Powershell中的Open Browser刚刚停止工作

Loo*_*awa 6 powershell internet-explorer

我一直在创建Windows Powershell脚本,以便在过去几周内自动化Web UI测试.它们都运行良好,直到今天我运行它们并获得了一百万例外.我尝试手动创建InternetExplorer对象:

$ie = new-object -com "InternetExplorer.Application"
Run Code Online (Sandbox Code Playgroud)

我收到这个错误:

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"
Run Code Online (Sandbox Code Playgroud)

这是我一直在使用InternetExplorer一直使用的完全相同的代码.为什么它突然停止工作,我该如何解决?

Kei*_*ill 7

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

已安排系统关闭.(HRESULT异常:0x800704A6)

您是否更新了IE或以其他方式安装需要重启机器的东西?