Blank chrome window appears and does nothing when running my first test script

Hi,

I’ve followed the instruction from codeceptjs website to create my first test. But it just opens blank window and does nothing after that.

Steps followed :

  • Installed Nodejs and editor
  • Installed webdriverio and codecept with command “npm install codeceptjs webdriverio --save-dev”
  • Setup done answer all question following the command “npx codeceptjs init”
  • Installed Selenium Standalone Server “npm install @wdio/selenium-standalone-service --save-dev”
  • Updated config file with the below to start selenium server automatically everytime
    wdio: {
    enabled: true,
    services: [‘selenium-standalone’]
    }
  • updated the test script file as below
    I.amOnPage(’/’);
    I.wait(20);
  • Executed the script using the command “npx codeceptjs run”

Output : A blank chrome browser window opens up and does nothing. After a while , I see the below error in terminal .

Error: Can’t connect to WebDriver.
Error: Failed to create session.
Unable to connect to “http://127.0.0.1:4444/wd/hub”, make sure browser driver is running on that address.
If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver.

Please make sure Selenium Server is running and accessible

***But I tried running selenium server manually, still I get the same issue.

Could someone let me know the resolution ?

Thank you !