Last active
November 1, 2024 10:19
-
-
Save Hoxolotl/4456161e8ed75f2efe4d594913498b77 to your computer and use it in GitHub Desktop.
Selenium ECONNREFUSED
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Builder, By, Key, until, Browser } from 'selenium-webdriver'; | |
| import tap from "tap"; | |
| import Chrome from 'selenium-webdriver/chrome.js'; | |
| async function firstTest() { | |
| let driver; | |
| const screen = { | |
| width: 1024, | |
| height: 786 | |
| }; | |
| driver = new Builder() | |
| .forBrowser(Browser.CHROME) | |
| //.setChromeOptions(new Chrome.Options().addArguments('--headless').windowSize(screen)) | |
| .build(); | |
| await driver.get('http://localhost:4500'); | |
| tap.test("Website online", async t => { | |
| //Check website online | |
| let title = await driver.getTitle(); | |
| t.equal("SLO Curriculum Browser", title); // ok 1 - should be equal | |
| let title2 = await driver.getTitle(); | |
| t.equal("SLO Curriculum Browser", title2); // not ok 2 - ECONNREFUSED connect ECONNREFUSED 127.0.0.1:53880 | |
| } | |
| firstTest().then(await driver.quit()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment