问题描述
在过去的几周中,我一直在创建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:
您是否更新了IE或以其他方式安装了需要重新启动计算机的内容?
Did you update IE or otherwise install something requiring a machine reboot?
这篇关于Powershell中的Open Browser刚刚停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!