diff --git a/src/testcafe-runner.ts b/src/testcafe-runner.ts index 1d112aee..7e85163c 100644 --- a/src/testcafe-runner.ts +++ b/src/testcafe-runner.ts @@ -126,6 +126,14 @@ export function buildCommandLine( const browserArgs = suite.browserArgs.join(' '); testCafeBrowserName = testCafeBrowserName + ' ' + browserArgs; } + + const browserProfile = process.env.SAUCE_FIREFOX_BROWSER_PROFILE; + if (browserProfile) { + const absolutePath = path.join(projectPath, browserProfile); + console.log(`Using Firefox profile: ${absolutePath}`); + testCafeBrowserName = `${testCafeBrowserName} -profile ${absolutePath}`; + } + cli.push(testCafeBrowserName); // Add all sources files/globs