为通过 Windows Scheduler 调度的基于 Watin 的 exe 打开多个 IE 窗口
我开发了一个使用 watin 来测试网站的应用程序。我每 15 分钟运行一次该作业,只要我在 Windows 2008 服务器上使用管理员帐户运行该作业,就不会出现任何问题。 最近,我尝试将其更改为本地计算机帐户(仅具有远程登录权限),之后每次调度程序运行 EXE 时,它都会打开 2-3 个 IE 窗口,而不是应有的 1 个。我认为它无法获取任何窗口的句柄,因此应用程序崩溃。
如果这里存在一些与权限相关的问题,或者可能的解决方案是什么,有什么想法吗?
谢谢, 尼尔马尔
I have developed an application using watin to test a website. I run the job every 15 minutes, and as long as I was running this with an admin account on the Windows 2008 server, there were no issues.
Recently, I tried changing this to an local computer account(with remote login rights only), and after that every time the scheduler runs the EXE, it opens up 2-3 IE windows instead of the 1 that it is supposed to. I think it is not able to get a handle on any of the windows, and hence the application crashes.
Any ideas if there is some permission related issue here, or what a possible solution could be?
Thanks,
Nirmal
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您说您只有“远程登录权限”时,我怀疑您可能还需要允许访问才能运行应用程序。在这种情况下这可能是问题所在。您是否尝试过在远程登录时运行任何其他应用程序?
另外,在运行测试的计算机上,我假设使用 Visual Studio,您可以将 Visual Studio 设置为以管理员身份运行吗?
为此,右键单击 VS 应用程序图标,您会在兼容性选项卡上看到“以管理员身份运行”。
顺便说一句,从远程计算机运行测试有一些问题。确保服务器和客户端没有打开自动锁定/屏幕保护程序。
让我们知道事情进展如何。
干杯。
When you say that you have "remote login rights" only, I suspect that you may also need to allow access to run applications. Which could be the problem in this case. Have you tried running any other application whilst logged in remotely?
Also, on the machine where you run the tests, I am assuming using Visual Studio, can you set Visual Studio to run as Admin?
To do this, right click on the VS application icon and you see a Run as Administrator on the compatibility tab.
Btw, running tests in from a remote machine has a few issues. Make sure the server and client don't have auto lock / screensaver turned on.
Let us know how this goes.
Cheers.