我无法在 TeamCity 代理上使用 FileDownloadHandler
我在 TeamCity 代理上运行 FileDownloadHandler
时遇到一些问题。
配置:
- Windows Server 2003
- Internet Explorer 7
- TeamCity Agent 作为控制台运行
我有一个非常简单的测试:
using (new UseDialogOnce(Browser.DialogWatcher, handler))
{
Browser.Button(Find.ById("ButtonExportReport")).Click();
handler.WaitUntilFileDownloadDialogIsHandled(10);
handler.WaitUntilDownloadCompleted(20);
}
当我使用 TeamCity 用户登录时(因此我的状态在任务管理器用户选项卡中为 Active
),一切正常。如果我断开连接(没有注销,因此我的状态在任务管理器用户选项卡中为 Disconnected
),则它不起作用。我明白
WatiN.Core.Exceptions.WatiNException: Has not shown dialog after 10 seconds.
你知道我能做什么吗?我放弃了对 WatiN 源代码的调查,我现在尝试设置我的服务器,以便用户会话始终处于活动状态。你知道我还能做什么吗?
I have some trouble to run the FileDownloadHandler
on my TeamCity agent.
Configuration:
- windows server 2003
- internet explorer 7
- TeamCity Agent run as console
I have a very simple test:
using (new UseDialogOnce(Browser.DialogWatcher, handler))
{
Browser.Button(Find.ById("ButtonExportReport")).Click();
handler.WaitUntilFileDownloadDialogIsHandled(10);
handler.WaitUntilDownloadCompleted(20);
}
When I am logged with TeamCity user (so my status is Active
in the task manager user tab), everything works. If I disconnect (without logging off, so my status is Disconnected
in the task manager user tab), it doesn't work. I get
WatiN.Core.Exceptions.WatiNException: Has not shown dialog after 10 seconds.
Do you know what I could do ? I give up about investigating in WatiN source code, I try now to setup my server so the user session is always Active
. Do you know else what I could do ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过更多调查,我了解到 WatiN 需要一个真正的用户直接登录服务器。因此,我按照以下说明在 Windows 2003 服务器中配置自动登录:http://support.microsoft。 com/kb/324737/en-us。因此,服务器在启动时会自动以 TeamCity 用户身份登录。
之后,我禁用 TeamCity 服务并将此批处理文件放入 TeamCity 用户的 Startup 文件夹中:
因此它会在记录时启动代理,因此在启动时启动。
After more investigation, I understood that WatiN need a real user logged directly on the server. So I configure the AutoLogin in windows 2003 server following this instruction: http://support.microsoft.com/kb/324737/en-us. So the server automatically logs as TeamCity user when it starts.
After, I disable the TeamCity Service and put in the Startup folder of the TeamCity user this batch file:
So it starts the agent when it logs, so at start up.