"Could not connect to the Selenium RC server" after some time of executing script
Try with $this->click("link=Next");The reason behind this, When selenium try to find a text and the page is not fully loaded or there are ambiguous text then selenium throws it and shows like "Could not connect to the Selenium RC server". verification/assertion of text is making problem some times.