Hi I have very ugly problem with: java.net.SocketException: No buffer space available (maximum connections reached?) It is client-server app. Client is Windows XP SP2 32
After reading the advice offered in this link! I was able to determine that I was using isDisplayed() way too often in too short of a time. Therefore, I placed a 5 millisecond wait between calls to isDisplayed. This fixed my Socket Exception issue.
for (final WebElement person: persons){
if (person.isDisplayed()){
dosomething;
sleep 5 milliseconds
}
}
As stated in the link you should insert a try catch just in case this wait is not long enough.