Webdriver Ausnahme: "chrome nicht erreichbar"

Ich bin mit selenium Testfälle in einem ubuntu-server die im Grunde genommen läuft testcases in firefox und chrome.
Firefox startet und Testfälle erfolgreich ausgeführt, aber chrome wirft Ausnahme:

*****unten ist der Ausschnitt von den stacktrace:*****

Ab ChromeDriver (v2.8.240825) auf port 21549

PAC-Unterstützung deaktiviert, da es keine system-Implementierung

Test IntegrationTest.AdminUserelementscheck fehlgeschlagen:

org.openqa.Selen.WebDriverException: chrome nicht erreichbar
(Treiber info: chromedriver=2.8.240825,Plattform=Linux 2.6.32-431.el6.x86_64 x86_64) (ACHTUNG: Der server lieferte keine stacktrace-Informationen)
[Fehler] - Befehl Dauer-oder timeout: 20.83 Sekunden


Hallo Unten ist der kleine Ausschnitt aus meinem code :

public class IntegrationTest {

private static final String configFile="test.properties";

private final String FIREFOX="firefox";

private final String CHROME="chrome";

private final String PHANTOMJS="phantomjs";

private final String BROWSERNAME="browser";

private static Properties props = new Properties();

public WebDriver webDriver;

private static Configuration additionalConfigurations;


@BeforeClass

public static void setUp() throws IOException, SQLException{

props.load(IntegrationTest.class.getResourceAsStream("/" + configFile));
        }

@test

public void AdminUserelementscheck() throws SQLException, IOException {

String[] browsers = props.getProperty(BROWSERNAME).split(",");

System.out.println("Number of browsers specified in conf:"+props.getProperty(BROWSERNAME));

for(String browser:browsers){

System.out.println("Browser currently processing:"+browser);

if(browser.equalsIgnoreCase(FIREFOX))

webDriver = new FirefoxDriver();

else if(browser.equalsIgnoreCase(CHROME))

webDriver = new ChromeDriver();

else

webDriver = new PhantomJSDriver();

running(testServer(3333,fakeApplication()),webDriver, new Callback<TestBrowser>() {


********* LOGIN AND ASSERTION STATMENTS*******************

browser.quit()

}

});

}
  • Es kann auch ein port-forwarding-Problem zwischen Ihrem docker-container und einem remote-Gerät/ - host.
Schreibe einen Kommentar