Alex Dai Playground

[Protructor] E2E test with firefox

| Comments

  1. 將 firefox 路徑 加入環境變數
  2. protractor.conf.js capabilities -> marionette : true
    略 ...
    capabilities: {
        browserName: 'firefox',
        marionette : true
    }
    
    錯誤訊息: The path to the driver executable must be set by the webdriver.gecko.driver system property;

WebDriverError: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms.

  1. 下載 geckodriver

  2. 啟動 selenium server
    java -jar /path/to/selenium-server-standalone-2.53.1.jar -Dwebdriver.gecko.driver=/path/to/geckodriver.exe

  3. 執行 protractor
    protractor protractor.conf.js

環境:

  • windows 10
  • protractor 4.0.3
  • selenium-server-standalone 2.53.1
  • geckodriver 0.9

參考:

Comments

comments powered by Disqus