【发布时间】:2020-07-22 05:47:56
【问题描述】:
如果我想关闭我用 powershell 打开的最新 Internet Explorer 选项卡 - 它不起作用 - 因为我被重定向到另一个站点进行登录。有人知道如何解决这个问题吗?
try
{
Write-Host "Starting Internet Explorer to get login token..."
$ie = New-Object -ComObject InternetExplorer.Application
$ie.visible = $true
$ie.Navigate("redirectLink")
Start-Sleep -s 3
$ie.Quit()
...
【问题讨论】:
-
我试图测试这个问题,但我无法使用上面的代码产生问题。选项卡正确关闭。如果 URL 是公开的,那么您可以尝试共享它。除此之外,您可以尝试告知我们您用于进行此测试的操作系统版本可能有助于缩小问题范围。
标签: windows powershell internet-explorer