简体   繁体   English

如何在Perl中关闭浏览器窗口

[英]How to close browser window in Perl

I have the following code to open a browser in Perl 我有以下代码在Perl中打开浏览器

$IE = Win32::OLE->new("InternetExplorer.Application");
$IE->{visible} = 1; #BTW what is visible doing here?
$IE->Navigate("http://google.com");
# Now I want to close the current window, how would I do this?

I tried: 我试过了:

$IE->close(); and $IE->close; $IE->close;

Nothing happened. 没啥事儿。

试试这个我已经测试过了,它的工作原理:

    $IE->Quit(); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在使用 perl 打开浏览器之前完全关闭当前浏览器窗口 - how to close the current browser window completely before opening the browser using perl 如何在Perl自动化中关闭应用程序窗口? - How to close an application window in Perl automation? 如何在Perl / Tk中关闭窗口? - How can I close a window in Perl/Tk? Perl:如何从称为脚本的脚本/二进制文件中检测并关闭对话框窗口? - Perl : How to detect & close a dialog window from a script/binary called? 运行Perl程序后如何关闭Windows CMD窗口? - How can I close a Windows CMD window after I run a Perl program? 如何在Perl中搜索窗口 - How to search for a window in perl 如何在perl脚本中使用Selenium Remote Driver最大化/最小化firefox浏览器窗口 - How to maximize/minimize the firefox browser window using Selenium Remote Driver in perl scripting Perl-我怎么知道套接字客户端何时断开连接(用户关闭窗口/浏览器时) - Perl- How Do i know when socket client is disconnected (when user closes window/browser) 创建新的perl / tk窗口,该窗口将在1秒后自动关闭 - Create new perl/tk window that will automatically close after 1sec 在perl中检测浏览器,如何检查浏览器是否为perl中的Internet Explorer(IE) - detect browser in perl,how to check if the browser is internet explorer(IE) in perl
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM