简体   繁体   中英

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

Im running a Selenium Webdriver with Java/TestNG automated user registration at my website. Reading from CSV

First, I open a Firefox with a certain profile Then I have a loop and in it I create a user and sign them out, and go to the signup page again and register another user, log them out etc.

It is all working, but I get these red warnings and I do not know what are they related to:

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

I understood now, thanks to the answer below, that I probably need to close() or disconnect() some connections, but which ones?

This snippet of code is what I do once:

 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);

and this is what I loop through:

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

and there is also an open connection to a CSV file reader, but at the end of the method, after passing an array of data, I close it.

This question solves this problem

It's the info-level message. Don't worry about it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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