Skip to content

Commit d1f4a99

Browse files
committed
update browser configuration instructions
1 parent 47c707e commit d1f4a99

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

src/lib/version-resolver.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ export function resolveVersion(requested: string, available: string[]): string {
2727
return requested;
2828
}
2929

30+
const caseInsensitiveMatch = uniq.find(
31+
(v) => v.toLowerCase() === requested.toLowerCase(),
32+
);
33+
if (caseInsensitiveMatch) {
34+
return caseInsensitiveMatch;
35+
}
36+
3037
// Try major version matching (e.g., "14" matches "14.0", "14.1", etc.)
3138
const reqNum = parseFloat(requested);
3239
if (!isNaN(reqNum)) {

src/tools/sdk-utils/bstack/commands.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,7 @@ Alternative setup for Gradle users:
9999
${GRADLE_SETUP_INSTRUCTIONS}`;
100100
}
101101

102-
function getPythonSDKInstructions(
103-
username: string,
104-
accessKey: string,
105-
): string {
102+
function getPythonSDKInstructions(username: string, accessKey: string): string {
106103
return `---STEP---
107104
Install BrowserStack Python SDK and setup:
108105
\`\`\`bash

src/tools/sdk-utils/bstack/configUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function generateBrowserStackYMLInstructions(config: {
1313
const platformConfigs = generatePlatformConfigs(config);
1414

1515
const stepTitle =
16-
"Create a browserstack.yml file in the project root with your validated device configurations:";
16+
"Create a browserstack.yml file in the project root with your validated device configurations:If already exists, update it with the following content for devices and project details.";
1717

1818
const buildName = `${projectName}-Build`;
1919

src/tools/sdk-utils/common/device-validator.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,14 @@ export async function validateDevices(
316316
validatedEnvironments.push(validatedEnv);
317317
}
318318

319+
if (framework === SDKSupportedBrowserAutomationFrameworkEnum.playwright) {
320+
validatedEnvironments.forEach((env) => {
321+
if (env.browser) {
322+
env.browser = env.browser.toLowerCase();
323+
}
324+
});
325+
}
326+
319327
return validatedEnvironments;
320328
}
321329

0 commit comments

Comments
 (0)