Reputation: 14711
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.
Upvotes: 1
Views: 2038