繁体   English   中英

Selenium Webdriver:INFO:连接到目标主机时捕获到I / O异常(java.net.BindException):已在使用地址:connect

[英]Selenium Webdriver: INFO: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect

我在我的网站上运行带有Java / TestNG自动用户注册的Selenium Webdriver。 从CSV读取

首先,我打开一个具有特定配置文件的Firefox,然后进行循环,在其中创建一个用户并将其注销,然后再次转到注册页面并注册另一个用户,然后注销等。

一切正常,但是我得到了这些红色警告,但我不知道它们与什么有关:

INFO: I/O exception (java.net.BindException) caught when connecting to the target host:
Address already in use: connect

我现在知道了,由于下面的答案,我可能需要关闭()或断开连接()某些连接,但是哪些连接呢?

此代码段是我曾经做过的事情:

 public void setUp(ArrayList<ArrayList<String>> array) throws Exception {
     long timeoutInSeconds = 30;
     ProfilesIni profile = new ProfilesIni();
     FirefoxProfile ffprofile = profile.getProfile("SELENIUM");
     WebDriver driver = new FirefoxDriver(ffprofile);
     WebDriverWait wait = new WebDriverWait(driver, timeoutInSeconds );
     driver.manage().window().maximize();
     driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
     userSignup(array, driver, wait);

这是我循环遍历的内容:

        driver.get("http://asd.asd.com/users/sign_up");

并且还与CSV文件阅读器建立了开放式连接,但是在方法结束时,在传递数据数组之后,我将其关闭。

这个问题解决了这个问题

这是信息级别的消息。 不用担心

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM