Skip to content

Commit

Permalink
fix: populate geckodriver options
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Sep 2, 2024
1 parent 26ab600 commit f30716e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ export async function start (params: GeckodriverParameters) {
// However, if --connect-existing is not used and --websocket-port is not specified, the websocketPort is set to 0.
if (startArgs.connectExisting && startArgs.websocketPort) {
throw new Error(
"Cannot use --connect-existing and --websocket-port together"
);
'Cannot use --connect-existing and --websocket-port together'
)
} else if (!startArgs.connectExisting && !startArgs.websocketPort) {
startArgs.websocketPort = 0;
startArgs.websocketPort = 0
}


const args = parseParams(startArgs)
log.info(`Starting Geckodriver at ${geckoDriverPath} with params: ${args.join(' ')}`)
Expand Down
6 changes: 6 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,9 @@ export interface GeckodriverParameters {
*/
cacheDir?: string
}

declare global {
namespace WebdriverIO {
interface GeckodriverOptions extends GeckodriverParameters { }
}
}

0 comments on commit f30716e

Please sign in to comment.