内容简介:http://stackoverflow.com/questions/16140865/unable-to-bind-to-locking-port-7054-within-45000-ms
在webdriver独立服务器中运行自动化时,我会随机得到这个异常.一旦到来,我杀死了所有的 java 进程.那么这个例外的解决方案是什么?为什么随机?
不幸的是,据我所知,所有建议使用最新版本的硒罐或来自兼容的firefox版本取决于硒版本或他们说要检查该端口是否正在使用(尽管不会!)或重启系统有人建议卸载firefox版本并重新安装.任何永久的解决方案或任何想法为什么来?
org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms Build info: version: '2.30.0', revision: 'dc1ef9c', time: '2013-02-19 00:15:27' System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0' Driver info: driver.version: FirefoxDriver Command duration or timeout: 47.94 seconds Build info: version: '2.28.0', revision: '18309', time: '2012-12-11 15:53:30' System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0' Driver info: org.openqa.selenium.remote.RemoteWebDriver
似乎像以前的webDriver实例(或其他东西)没有释放端口.这个问题的解决方法(不好的做法)(Java):
public static FirefoxBrowser forceInit() { try { return new FirefoxBrowser(); } catch (WebDriverException exc) { return forceInit(); } }
确保您的测试正确关闭驱动程序:
driver.quit();
http://stackoverflow.com/questions/16140865/unable-to-bind-to-locking-port-7054-within-45000-ms
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- Netty源码分析--Channel注册&绑定端口(下)(七)
- Docker 快速验证:不转发让 Tomcat 绑定 80 端口
- Nginx+Tomcat实现80端口转发8080端口
- 猎鹰网络安全工具新功能:主机端口扫描可以自定义端口范围
- nginx代理其他端口到80端口-低调小熊猫的技术小黑屋
- 浅析Linux网络端口
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Building Social Web Applications
Gavin Bell / O'Reilly Media / 2009-10-1 / USD 34.99
Building a social web application that attracts and retains regular visitors, and gets them to interact, isn't easy to do. This book walks you through the tough questions you'll face if you're to crea......一起来看看 《Building Social Web Applications》 这本书的介绍吧!