2014-09-04 25 views
4

因此,出於某種原因,當我運行量角器時,Firefox(32最新版本)僅以空白瀏覽器打開,不會導航到baseURL。我已經寫好的測試用Chrome瀏覽器正常工作,但不適用於Firefox。這可能與配置文件的設置方式有關。有任何想法嗎?使用Firefox的量角器(32個最新版本)瀏覽器未加載

的conf文件:

exports.config = { 
    allScriptsTimeout: 11000, 

    specs: [ 
     'e2e/*.js' 
    ], 

    multiCapabilities: [ 
     { 
      'browserName': 'firefox' 
     }, 
     { 
      'browserName': 'chrome' 
     } 
    ], 

    chromeOnly: false, 

    chromeDriver: 'e2e/chromedriver/', 

    baseUrl: 'http://localhost:9000/', 

    framework: 'jasmine', 

    jasmineNodeOpts: { 
     defaultTimeoutInterval: 30000 
    } 
}; 

回答

7

火狐32與硒< = 2.42.2

UPDATE破硒2.43已經出來了。

需要selenium 2.43或更高版本。或將Firefox降級至版本31或更低版本。

問題:https://code.google.com/p/selenium/issues/detail?id=7642

FYI輸出可能是這樣的:

Using the selenium server at: http://localhost:4444/wd/hub 

/home/username/e2e/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:109 
    var template = new Error(this.message); 
       ^
UnknownError: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: 
003407891246748webdriver-profile/extensions/[email protected] 
1409877425492 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous7362003407891246748webdriver-profile/extensions/webdriver-staging 
1409877425492 addons.xpi DEBUG checkForChanges 
1409877425502 addons.xpi DEBUG Directory state JSON differs:........ 
+0

感謝的人。這確實是問題。我只是降級,似乎至少運行測試(即使有一些點擊問題)。 – user3129120 2014-09-05 17:03:37

+0

任何想法爲什麼我的測試通過鉻,但顯示如下: Stacktrace: ElementNotVisibleError:元素當前不可見,因此可能不會與Firefox的 交互?這些元素似乎沒有得到正確的點擊。 – user3129120 2014-09-05 17:40:37

+0

你應該爲這個問題打開一個單獨的問題,請包括一些HTML和測試代碼;) – 2014-09-05 18:35:41

相關問題