Skip to content

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthemanuel committed Oct 18, 2024
1 parent e1df8c0 commit ce67a9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions packages/server/lib/browsers/firefox-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,20 @@ async function navigateToUrlClassic (url: string) {
export default {
async setup ({
automation,
onError,
url,
foxdriverPort,
remotePort,
webdriverClient: wdInstance,
}: {
automation: Automation
onError?: (err: Error) => void
url: string
foxdriverPort: number
remotePort: number
webdriverClient: WebDriverClient
}): Promise<BrowserCriClient> {
// set the WebDriver classic instance instantiated from geckodriver
webdriverClient = wdInstance
const [, browserCriClient] = await Promise.all([
this.setupFoxdriver(foxdriverPort),
const [browserCriClient] = await Promise.all([
setupCDP(remotePort, automation, onError),
])

Expand Down
6 changes: 3 additions & 3 deletions packages/server/lib/browsers/firefox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,13 @@ export async function open (browser: Browser, url: string, options: BrowserLaunc
const [
marionettePort,
webDriverBiDiPort,
] = await Promise.all([getPort(), getPort(), getPort()])
] = await Promise.all([getPort(), getPort()])

defaultLaunchOptions.preferences['marionette.port'] = marionettePort

// NOTE: we get the BiDi port and set it inside of geckodriver, but BiDi is not currently enabled (see remote.active-protocols above).
// this is so the BiDi websocket port does not get set to 0, which is the default for the geckodriver package.
debug('available ports: %o', { foxdriverPort, marionettePort, webDriverBiDiPort })
debug('available ports: %o', { marionettePort, webDriverBiDiPort })

const profileDir = utils.getProfileDir(browser, options.isTextTerminal)

Expand Down Expand Up @@ -686,7 +686,7 @@ export async function open (browser: Browser, url: string, options: BrowserLaunc
}))

debug('setting up firefox utils')
browserCriClient = await firefoxUtil.setup({ automation, url, foxdriverPort, webdriverClient, remotePort: cdpPort, onError: options.onError })
browserCriClient = await firefoxUtil.setup({ automation, url, webdriverClient, remotePort: cdpPort, onError: options.onError })

await utils.executeAfterBrowserLaunch(browser, {
webSocketDebuggerUrl: browserCriClient.getWebSocketDebuggerUrl(),
Expand Down

0 comments on commit ce67a9e

Please sign in to comment.