Skip to content

Commit

Permalink
Merge pull request #47 from zowe/users/mergev3master
Browse files Browse the repository at this point in the history
fixed getFirefoxDriver function
  • Loading branch information
MarkAckert authored Oct 30, 2024
2 parents 30ffe03 + 5fec61e commit 1a45daf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/DriverUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const firefox = require('selenium-webdriver/firefox');
const chrome = require('selenium-webdriver/chrome');

export interface IDriverSetting {
headless: boolean; // Changed to lowercase 'boolean'
headless: boolean;
}

const DEFAULT_DRIVER_SETTING: IDriverSetting = { headless: true };
Expand Down Expand Up @@ -64,9 +64,7 @@ export async function getFirefoxDriver(driverSettings: IDriverSetting): Promise<

// use headless mode
if (headless) {
options.headless(); // Make sure this is correct for your version
// Alternatively, you can use:
// options.addArguments('-headless');
options.addArguments('-headless'); // Correct method to set headless mode
}

const capabilities = Capabilities.firefox();
Expand All @@ -82,7 +80,7 @@ export async function getFirefoxDriver(driverSettings: IDriverSetting): Promise<
.withCapabilities(capabilities)
.setFirefoxOptions(options)
.setFirefoxService(service)
.build(); // Ensure build is chained correctly
.build();

return driver;
}
Expand Down

0 comments on commit 1a45daf

Please sign in to comment.