Selenium RC 无法检索或页面加载超时。
我将一个工作 Selenium 测试用例导出到 Java,通过 Eclipse 上的 Junit4 中的 selenium-rc 的 selenium-server.jar 运行它。
测试用例在打开页面后中断下一步,尝试写入元素。当单步执行运行时时,我注意到了错误,
<块引用>无法检索请求的 URL
遇到以下错误:
无法根据未知服务器名称的主机名确定 IP 地址
这意味着:缓存无法解析 URL 中显示的主机名。检查地址是否正确。
于是,我把url改成了网页对应的IP地址,但是现在超时了。
手动使用 url 和 IP 格式打开页面是可行的(除了 IP 不适用于 IE8)。我最初的目标是 Firefox,但一旦解决了这个问题,我就会扩展到其他浏览器。
Selenium 通过 RC 以编程方式在浏览器中打开页面是否存在浏览器不喜欢的安全问题?我应该调查什么样的问题来解决这个问题?
I exported a working Selenium test case to Java, running it via selenium-rc's selenium-server.jar in Junit4 on Eclipse.
The test case breaks the next step after opening the page, trying to write to an element. When stepping through the runtime I noticed the error,
The requested URL could not be retrieved
The following error was encountered:
Unable to determine IP address from host name for unknown server name
This means that: The cache was not able to resolve the hostname presented in the URL. Check if the address is correct.
So, I changed the url to the corresponding IP address of the web page, but now I am timing out.
Opening the page using both the url and IP formats manually is working, (except IP doesn't for IE8). I'm originally targeting Firefox, but will expand to other browsers once I have solved this issue.
Is there a security issue involved with Selenium opening a page in a browser via RC programatically that browsers don't like? What sort of issues should I be investigating to solve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您正在尝试打开一个安全页面。在具有 ssl 证书的 selenium 页面中应该进行处理。
I think you are trying to open a secure page.In selenium pages which has ssl certificates should be handled.
问题实际上归结为我机器上设置的代理。删除后一切正常。
The problem actually came down to the proxy set up on my machine. After removing it things worked fine.