如何在Perl中关闭浏览器窗口(How to close browser window 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?
我试过了:
$IE->close();
和$IE->close;
没啥事儿。
I have the following code to open a browser in 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;
Nothing happened.
原文:https://stackoverflow.com/questions/11078760
更新时间:2022-03-13 14:03
最满意答案
您可以通过将
$PATH
放在现有值的末尾来扩展/追加到PATH环境变量。 就像是:my_return.addStep(ShellCommand(command=["qmake", "{0}.pro".format(pro_name)], env={'PATH': [qt_path, "${PATH}"]}))
buildbot 文档中的更多详细信息。
You can extend/append to the PATH environment variable by putting
$PATH
at the end of the existing value. Something like:my_return.addStep(ShellCommand(command=["qmake", "{0}.pro".format(pro_name)], env={'PATH': [qt_path, "${PATH}"]}))
More details at the buildbot documentation.
相关问答
更多-
您可以通过将$PATH放在现有值的末尾来扩展/追加到PATH环境变量。 就像是: my_return.addStep(ShellCommand(command=["qmake", "{0}.pro".format(pro_name)], env={'PATH': [qt_path, "${PATH}"]})) buildbot 文档中的更多详细信息。 You can extend/append to the PATH environment v ...
-
在使用OpenEmbedded / Yocto时,我们以类似于以下的方式解决了问题: class EnvStep(ShellCommand): def __init__(self, command='', **kwargs): kwargs['command'] = [ 'bash', '-c', 'source environment-set-up-script; %s' % command ] ShellCommand.__ ...
-
您可以使用:let命令更改Vim内部的环境变量。 let s:portablepy = 'C:\portable\PortablePython_1.1_py2.5.4' " Add PortablePython's path to $PATH if running on Windows and PortablePython exists if (has('win32') || has('win64')) && isdirectory(s:portablepy) let $PATH .= ';' . ...
-
运行Docker容器时,如何附加到PATH环境变量?(How do I append to PATH environment variable when running a Docker container?)[2023-05-06]
如果您使用-e选项,则$ PATH值是主机的路径而不是容器。 你可以这样做: docker run -it -v $(PWD):/app debian:jessie bash -c 'export PATH=$PATH:/app/bin; bash' If you you use -e option, the $PATH value is the PATH of the host instead of the container. You can do it like this: docker run - ... -
如sphinx.ext.coverage页面所述 ,如果指定了builder -b coverage ,则计算-b coverage 。 结果是文件"python.txt" ,一个"python.txt"文件。 将它集成到您自己的文档中是您的任务。 as stated on the sphinx.ext.coverage page, coverage is computed if one specifies the builder -b coverage. the result is the file "p ...
-
要执行python代码,您需要编写自定义构建步骤 - 一个从BuildStep继承的类,并在run()方法中使用您的代码。 请注意,此代码将在master上执行(与问题的ShellCommand一样)。 要在从属设备上执行代码,您需要使用RemoteShellCommand。 查看所有细节的文档。 To execute python code you need to write custom build step - a class inherited from BuildStep with your co ...
-
守护buildbot开始(Daemonized buildbot start)[2022-09-01]
Buildbot bootstrap基于Twisted的“.tac”文件,预计将使用twistd -y buildbot.tac开始。 buildbot start脚本实际上只是一个方便的包装。 它实际上只是运行扭曲,然后观察日志以确认buildbot已成功启动。 在日志观察之后没有增加任何值,因此使用buildbot start启动buildbot并不是强制性的。 你可以用twistd -y buildbot.tac来启动它。 正如你指出的那样,官方docker镜像正在用twistd twistd -ny ... -
这是解决使用Buildbot属性 。 您可以通过命令行(使用PBChangeSource)使用该标志发送它们 buildbot sendchange ... --properties=my_property:myvalue 如果需要多个属性,该标志可以用于多种音色。 This is solved Using Buildbot Properties. You cand send them via command line (with PBChangeSource) using the flag buildb ...
-
那么,你好,如果你试图使用SSH使用Buildbot 0.8.X轮询git repo,他们就会遇到一些问题。 你应该在他们的TRAC [1]上关注这个主题。 显然他们正在研究它。 [1] http://trac.buildbot.net/ticket/2343 Well, Hello there, If you're trying to poll a git repo with Buildbot 0.8.X by using SSH, they're having some issues with that ...
-
既然你正在使用/bin/sh ,只需用一个字符串调用它: f1.addStep(shell.ShellCommand, command="pwd && cd /home/xxx/yyy && pwd") 正如文件所说: ShellCommand参数是: 命令 字符串列表(首选)或单个字符串(不鼓励),它指定要运行的命令。 首选字符串列表,因为它可以直接用作argv数组。 使用单个字符串(带有嵌入空格)需要buildslave将字符串传递给/ bin / sh进行解释,这引发了有关如何转义或解释shell元 ...