For my work in my company. I need to test if on the environment I can open a web page from JavaScript with edge. The problem is that this code opens edge but not the google page. it doesn't open anything.
const { Builder } = require("selenium-webdriver");
const edge = require("selenium-webdriver/edge");
const edgeDriverPath = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
const driver = new Builder()
.forBrowser("MicrosoftEdge")
.setEdgeService(new edge.ServiceBuilder(edgeDriverPath))
.build();
(async function () {
try {
await driver.get("https://www.google.com");
} finally {
await driver.quit();
}
})();
In my terminal I get this when i use npm run start:
Error: Server terminated early with status 0
at C:\Users\B63183\Documents\Projet_Automatisation\node_modules\selenium-webdriver\remote\index.js:259:24
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.15.0
After that, the work environment I have is pretty closed with my company. It's possible that it's a problem of version of Edge or selenium.