Verbindung zum Host 127.0.0.1 über Port 7055 nicht möglich
Ich bin ein Neuling mit Webdriver und brauche Hilfe.
Ich verwende Selenium 2.2.0 mit FF v7.0.1 unter Windows XP
Ich habe es geschafft, ein Java-Skript erfolgreich im Internet Explorer aufzuzeichnen und wiederzugeben. Wenn ich jedoch versuche, dasselbe Skript in FF auszuführen, wird die folgende Fehlermeldung angezeigt:
Verbindung zum Host 127.0.0.1 auf Port 7055 nach 45000 ms nicht möglich
Ich habe an einer Reihe von Stellen gelesen, dass ein Downgrade der Firefox-Version auf 3.6 gut funktioniert, aber ich bin nicht darauf aus, ein Downgrade durchzuführen. Kann mir bitte jemand sagen, was ich falsch mache?
<code>package hisScripts; import java.util.concurrent.TimeUnit; import org.junit.*; import static org.junit.Assert.*; import org.openqa.selenium.*; import org.openqa.selenium.firefox.FirefoxDriver; public class WebdriverTest_1 { private WebDriver driver; private String baseUrl; private StringBuffer verificationErrors = new StringBuffer(); @Before public void setUp() throws Exception { driver = new FirefoxDriver(); //driver=new InternetExplorerDriver(); baseUrl = "https://**********/"; driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); } @Test public void testUntitled() throws Exception { driver.get(baseUrl + "/"); driver.findElement(By.xpath("//a[contains(text(),'my profile')]")).click(); driver.findElement(By.xpath("//a[contains(text(),'about the service')]")).click(); driver.findElement(By.xpath("//a[contains(text(),'contact us')]")).click(); driver.findElement(By.xpath("//a[contains(text(),'help')]")).click(); driver.findElement(By.xpath("//a[contains(text(),'home')]")).click(); driver.findElement(By.xpath("//a[contains(text(),'logout')]")).click(); } @After public void tearDown() throws Exception { driver.quit(); String verificationErrorString = verificationErrors.toString(); if (!"".equals(verificationErrorString)) { fail(verificationErrorString); } } private boolean isElementPresent(By by) { try { driver.findElement(by); return true; } catch (NoSuchElementException e) { return false; } } </code>
}