@appliqation/automation-sdk 2.1.3 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appliqation/automation-sdk",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"description": "Appliqation Automation SDK with API key authentication, custom run titles, and framework-specific reporters",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -554,7 +554,21 @@ class AppliqationReporter {
|
|
|
554
554
|
continue;
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
-
|
|
557
|
+
// Get browser name from project - check multiple sources
|
|
558
|
+
let browserName = project.use?.browserName || project.use?.defaultBrowserType;
|
|
559
|
+
|
|
560
|
+
// Fallback to project name if it matches browser names
|
|
561
|
+
if (!browserName) {
|
|
562
|
+
const projectName = (project.name || '').toLowerCase();
|
|
563
|
+
if (projectName.includes('chromium') || projectName.includes('chrome')) {
|
|
564
|
+
browserName = 'chromium';
|
|
565
|
+
} else if (projectName.includes('firefox')) {
|
|
566
|
+
browserName = 'firefox';
|
|
567
|
+
} else if (projectName.includes('webkit') || projectName.includes('safari')) {
|
|
568
|
+
browserName = 'webkit';
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
|
|
558
572
|
if (!browserName) continue;
|
|
559
573
|
|
|
560
574
|
try {
|
|
@@ -565,20 +579,20 @@ class AppliqationReporter {
|
|
|
565
579
|
switch (browserName.toLowerCase()) {
|
|
566
580
|
case 'chromium':
|
|
567
581
|
case 'chrome':
|
|
568
|
-
browser = await chromium.launch();
|
|
582
|
+
browser = await chromium.launch({ headless: true });
|
|
569
583
|
version = browser.version();
|
|
570
584
|
await browser.close();
|
|
571
585
|
break;
|
|
572
586
|
|
|
573
587
|
case 'firefox':
|
|
574
|
-
browser = await firefox.launch();
|
|
588
|
+
browser = await firefox.launch({ headless: true });
|
|
575
589
|
version = browser.version();
|
|
576
590
|
await browser.close();
|
|
577
591
|
break;
|
|
578
592
|
|
|
579
593
|
case 'webkit':
|
|
580
594
|
case 'safari':
|
|
581
|
-
browser = await webkit.launch();
|
|
595
|
+
browser = await webkit.launch({ headless: true });
|
|
582
596
|
version = browser.version();
|
|
583
597
|
await browser.close();
|
|
584
598
|
break;
|
|
@@ -299,7 +299,8 @@ class DeviceOsDetector {
|
|
|
299
299
|
|
|
300
300
|
// Check browserName property FIRST (takes precedence over project name)
|
|
301
301
|
// This allows explicit browser version strings like "chrome142" or "safari 18.7.2"
|
|
302
|
-
|
|
302
|
+
// Also check defaultBrowserType from Playwright device presets
|
|
303
|
+
const browserName = project.use?.browserName || project.use?.defaultBrowserType;
|
|
303
304
|
let browserVersion = project.use?.metadata?.browserVersion;
|
|
304
305
|
|
|
305
306
|
// Auto-detect browser version if browser instance provided and no manual version
|