Connection refused! Is selenium server started nightwatch on edge

前端 未结 1 1646
眼角桃花
眼角桃花 2021-01-26 16:19

I have create a project. It is a vue.js application. There is a small set of unit tests (jest) and an end-to-end test (night watch).

When I try and run the end-to-end tes

相关标签:
1条回答
  • 2021-01-26 16:33

    This error message...

    Error retrieving a new session from the selenium server
    
    Connection refused! Is selenium server started?
    { value: { message: 'Unable to create session from org.openqa.selenium.remote.NewSessionPayload@16b328bc\nBuild info: version: \'3.12.0\', revision: \'7c6e0b3\', time: \'2018-05-08T15:15:08.936Z\'\nSystem info: host: \'SYNERGY02\', ip: \'192.168.1.41\', os.name: \'Windows 10\', os.arch: \'amd64\', os.version: \'10.0\', java.version: \'1.8.0_181\'\nDriver info: driver.version: unknown', error: 'session not created' }, status: 33 }
    

    ...implies that there was an error connecting to the Selenium Server.

    The Selenium Server logs would have given us some more leads to exactly went wrong.

    However it seems there is discrepency between your target Test Environment and the existing Test Environment underneath as follows:

    • You have mentioned:

      • my nightwatch from package.json ver: "selenium-server": "^3.0.1"
    • But your error trace log mentions:

      • version: \'3.12.0\' of time: \'2018-05-08T15:15:08.936Z\

    Solution

    • Ensure that your Test Environment is configured with a unique set of Selenium Server binaries.
    • Before you start the @Tests ensure Selenium Server is started through the following command:

      java -jar <path_to>/selenium-server-standalone-<version>.jar
      
    • If you want to use native events functionality, indicate this on the command line with the option:

      -Dwebdriver.enable.native.events=1
      
    • To get help on other command line options, execute:

      java -jar <path_to>/selenium-server-standalone-<version>.jar -help
      
    • You can find a similar detailed discussion in:

      • 'Connection refused! Is selenium server started?\n' while running Nightwatch.js tests against Selenium Grid
    0 讨论(0)
提交回复
热议问题