social-agent-cli 3.1.1 → 3.2.0
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
|
@@ -176,9 +176,16 @@ export class BrowserDriver {
|
|
|
176
176
|
case "upload": {
|
|
177
177
|
const filePath = val || imagePath || "";
|
|
178
178
|
if (!filePath || filePath.includes("{{")) break;
|
|
179
|
+
// Her zaman input[type=file] ile yükle - en güvenilir yol
|
|
180
|
+
try {
|
|
181
|
+
this.cmd(`upload "input[type='file']" "${filePath}"`, 10000);
|
|
182
|
+
if (step.waitMs) this.cmd(`wait ${step.waitMs}`);
|
|
183
|
+
return;
|
|
184
|
+
} catch {}
|
|
185
|
+
// Fallback: selector'larla dene
|
|
179
186
|
const sels = [step.selector, ...(step.fallbackSelectors || [])].filter(Boolean);
|
|
180
187
|
for (const sel of sels) {
|
|
181
|
-
try { this.cmd(`upload "${sel}" "${filePath}"
|
|
188
|
+
try { this.cmd(`upload "${sel}" "${filePath}"`, 10000); if (step.waitMs) this.cmd(`wait ${step.waitMs}`); return; } catch {}
|
|
182
189
|
}
|
|
183
190
|
throw new Error(`Upload: ${filePath}`);
|
|
184
191
|
}
|