watir - 在服务器上运行时 file_field 不起作用
我目前正在编写使用 ie 中的文件浏览器上传图像的功能。 在本地,这工作正常,打开文件资源管理器并找到图像,没有任何问题。然而,当我将它作为在服务器上运行的验收运行的一部分运行时,它无法打开文件资源管理器,它只会坐在那里等待它,它甚至不会在通常的 60 秒内超时,所以我假设有什么东西正在尝试发生在幕后,但正在悄然失败。
有没有人遇到过这个问题并找到解决方法或解决方法?
I am currently writing features to upload an image using the file exploer in ie.
Locally this works fine and opens the file explorer and locates the image without any problems. However when i run it as part of the acceptance run ont he server it self it fails to open the file explorer, It will just sit there waiting for it, it doesnt even time out at the usual 60 seconds so i assume something is trying to happen behind the scenes but is failing silently.
Has anyone had this issue and found a fix or work around for it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
大多数服务器默认情况下都非常锁定 IE,因为通常很少从服务器进行浏览,而且浏览器本身就是一个重要的攻击面。请参阅此处了解详细信息 http://msdn.microsoft.com/en-us/library/ms537180(v=vs.85).aspx
结果是,除非禁用此增强功能安全方面,有很多事情光靠表面是行不通的。如果您从安装网站的同一服务器运行测试,则需要禁用 IE 上的所有增强安全功能。
这将违反生产系统的最佳实践,但对于测试系统来说,这是一种可以理解的权宜之计,可以作为测试平台使用一对具有不同操作系统(客户端和服务器)的系统并在客户端上运行测试的替代方案。 (更现实,但需要创建和维护另一个系统或虚拟机)
Most servers have IE very locked down by default since very little browsing is typically done from servers, and the browser itself represents a significant attack surface. See here for more info http://msdn.microsoft.com/en-us/library/ms537180(v=vs.85).aspx
The result is that unless you disable this enhanced security there are a number of things that just flat out won't work. If you are running your test from the same server where the website is installed, then you will need to disable all the enhanced security stuff on IE.
This would be a violation of best practices for a production system, but is an understandable expedient for a test system as an alternative to having a pair of systems with different OS's (client and server) for your testbed and running the tests on the client. (more realistic, but requires another system or VM be created and maintained)