2017-09-30 1 views
-1

Le navigateur s'ouvre, mais il semble que l'initialisation ne parvienne pas à renvoyer une instance du pilote. Au début, j'essayais juste d'utiliser le pilote firefox par défaut fourni avec Selenium, mais en surfant sur le net, j'ai trouvé une solution possible en utilisant le pilote gecko et en définissant les capacités souhaitées sur marionette. Mais je reçois toujours la même question que détaillé ci-dessous:Problèmes lors des tests Web sur MacOS avec Firefox: Impossible de se connecter à l'hôte 127.0.0.1 sur le port 7055 après 45 000 ms. Sortie de la console Firefox:

Environnement Détails:

OS: macOs Sierra, 10.12.6 
Browser: Firefox --> 55.0.3 (64-bit) 
Driver: geckodriver 
Selenium: 2.53.0 

StackTrace:

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: 
ager DEBUG Registering shutdown blocker for <unnamed-provider> 
1506807895921 addons.manager DEBUG Provider finished startup: <unnamed-provider> 
1506807895924 addons.xpi INFO Mapping [email protected] to /var/folders/9p/2htxqw413p57h8nlv3mzk0w96r_3bp/T/anonymous2657944051650289643webdriver-profile/extensions/[email protected] 
1506807895925 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: /var/folders/9p/2htxqw413p57h8nlv3mzk0w96r_3bp/T/anonymous2657944051650289643webdriver-profile/extensions/webdriver-staging 
1506807895925 addons.xpi DEBUG Existing add-on [email protected] in app-profile 
1506807895926 addons.xpi INFO Mapping [email protected] to /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1506807895927 addons.xpi INFO Mapping clicktoplay-roll[email protected] to /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1506807895928 addons.xpi INFO Mapping [email protected] to /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1506807895928 addons.xpi INFO Mapping [email protected] to /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1506807895928 addons.xpi INFO Mapping [email protected] to /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1506807895928 addons.xpi INFO Mapping [email protected] to /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1506807895928 addons.xpi INFO Mapping [email protected] to /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1506807895928 addons.xpi INFO Mapping [email protected] to /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1506807895928 addons.xpi DEBUG Existing add-on [email protected] in app-system-defaults 
1506807895929 addons.xpi DEBUG Existing add-on [email protected] in app-system-defaults 
1506807895929 addons.xpi DEBUG Existing add-on [email protected] in app-system-defaults 
1506807895929 addons.xpi DEBUG Existing add-on [email protected] in app-system-defaults 
1506807895929 addons.xpi DEBUG Existing add-on [email protected] in app-system-defaults 
1506807895930 addons.xpi DEBUG Existing add-on [email protected] in app-system-defaults 
1506807895930 addons.xpi DEBUG Existing add-on [email protected] in app-system-defaults 
1506807895930 addons.xpi DEBUG Existing add-on [email protected] in app-system-defaults 
1506807895930 addons.xpi INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to /Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi 
1506807895931 addons.xpi DEBUG Existing add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} in app-global 
1506807895931 addons.xpi DEBUG getInstallState changed: false, state: {} 
2017-09-30 14:44:56.051 firefox-bin[44193:336169] IMKInputSession presentFunctionRowItemTextInputViewWithEndpoint:completionHandler: : [self textInputContext]=0x12826f3a0 *NO* NSRemoteViewController to client, NSError=Error Domain=NSCocoaErrorDomain Code=4097 "connection from pid 0" UserInfo={NSDebugDescription=connection from pid 0}, com.apple.inputmethod.EmojiFunctionRowItem 
1506807896108 addons.productaddons INFO sending request to: https://aus5.mozilla.org/update/3/GMP/55.0.3/20170824053838/Darwin_x86_64-gcc3/en-US/release/Darwin%2016.7.0/default/default/update.xml 
1506807896377 addons.productaddons INFO Completed downloading document 
1506807896775 addons.productaddons INFO downloadXHR File download. status=200 
1506807896784 addons.productaddons INFO Downloaded file will be saved to /var/folders/9p/2htxqw413p57h8nlv3mzk0w96r_3bp/T/tmpaddon 
1506807897933 addons.productaddons INFO downloadXHR File download. status=200 
1506807897936 addons.productaddons INFO Downloaded file will be saved to /var/folders/9p/2htxqw413p57h8nlv3mzk0w96r_3bp/T/tmpaddon 

    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:113) 
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:271) 
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:119) 
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:216) 
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211) 
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:128) 
    at com.move.lead.allocation.CommonTestBase.initialize(CommonTestBase.java:68) 
    at com.move.lead.allocation.api.ApiTestBase.testExceutionPreChecks(ApiTestBase.java:89) 
    at com.move.lead.allocation.api.ApiTestBase.intializetestMethod(ApiTestBase.java:73) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104) 
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:515) 
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:217) 
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:590) 
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851) 
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177) 
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129) 
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112) 
    at org.testng.TestRunner.privateRun(TestRunner.java:756) 
    at org.testng.TestRunner.run(TestRunner.java:610) 
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:387) 
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382) 
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340) 
    at org.testng.SuiteRunner.run(SuiteRunner.java:289) 
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) 
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) 
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1293) 
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1218) 
    at org.testng.TestNG.runSuites(TestNG.java:1133) 
    at org.testng.TestNG.run(TestNG.java:1104) 
    at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132) 
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230) 
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76) 
+0

S'il vous plaît Lire [ask], en particulier la partie sur [mcve] (MCVE), et [Comment beaucoup d'effort de recherche est attendu?] (https://meta.stackoverflow.com/questions/261592/how-much-research-effort-is-expected-of-stack-overflow-users) Cela vous aidera à déboguer vos propres programmes et résoudre les problèmes pour vous-même. Si vous faites cela et que vous êtes toujours bloqué, vous pouvez revenir et publier votre MCVE, ce que vous avez essayé et le résultat de l'exécution, y compris les messages d'erreur afin que nous puissions mieux vous aider. Fournissez également un lien vers la page et/ou le code HTML pertinent. – JeffC

Répondre