Skip to content

Commit fdc646a

Browse files
fix!: use gridUrl: "local" by default
1 parent 7bc315b commit fdc646a

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/browser/new-browser.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
} from "../constants/config";
1919
import { Config } from "../config";
2020
import { BrowserConfig } from "../config/browser-config";
21-
import { gridUrl as DEFAULT_GRID_URL } from "../config/defaults";
2221
import { BrowserName, type W3CBrowserName } from "./types";
2322

2423
export type VendorSpecificCapabilityName = "goog:chromeOptions" | "moz:firefoxOptions" | "ms:edgeOptions";
@@ -151,7 +150,7 @@ export class NewBrowser extends Browser {
151150
} else {
152151
// if automationProtocol is not "webdriver", fallback to default grid url from "local"
153152
// because in "devtools" protocol we dont need gridUrl, but it still has to be valid URL
154-
gridUrl = config.gridUrl === LOCAL_GRID_URL ? DEFAULT_GRID_URL : config.gridUrl;
153+
gridUrl = config.gridUrl === LOCAL_GRID_URL ? "http://localhost:4444/wd/hub" : config.gridUrl;
155154
}
156155

157156
const gridUri = new URI(gridUrl);

src/config/defaults.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
"use strict";
22

33
const { DisableHoverMode } = require("../browser/isomorphic");
4-
const { WEBDRIVER_PROTOCOL, SAVE_HISTORY_MODE, NODEJS_TEST_RUN_ENV } = require("../constants/config");
4+
const { WEBDRIVER_PROTOCOL, SAVE_HISTORY_MODE, NODEJS_TEST_RUN_ENV, LOCAL_GRID_URL } = require("../constants/config");
55
const { TimeTravelMode } = require("./types");
66

77
module.exports = {
88
baseUrl: "http://localhost",
9-
gridUrl: "http://localhost:4444/wd/hub",
9+
gridUrl: LOCAL_GRID_URL,
1010
browserWSEndpoint: null,
1111
desiredCapabilities: null,
1212
automationProtocol: WEBDRIVER_PROTOCOL,

0 commit comments

Comments
 (0)