assaf / zombie

Insanely fast, full-stack, headless browser testing using node.js
http://zombie.js.org/
MIT License
5.65k stars 518 forks source link

Getting "Error: No valid WebSocket class provided" #1207

Open adelriosantiago opened 4 years ago

adelriosantiago commented 4 years ago

I am trying to run this sharedb example in localhost:8080. But I am getting an "Error: No valid WebSocket class provided" during browser.visit. Here is the following code:

This is the code I am using:

const Browser = require("zombie");
setTimeout(() => { // Just a timeout to wait for the example load
  const browser = new Browser();
  browser.visit("http://localhost:8080/", (err) => {
    console.log("err", err); // ERROR HERE
    browser.fill("#field", "zombie@underworld.dead") // textarea#field added the index.html
  });
}, 5000);

Why? How can I fix it?