Instagram jobs refactor + started InstagramNotifications

This commit is contained in:
2025-08-05 13:25:25 +02:00
parent 1f23b112d7
commit aa936a2a11
9 changed files with 444 additions and 86 deletions

View File

@ -366,4 +366,16 @@ abstract class BrowserJob implements ShouldQueue
AllNotification::send(new JobDebugNotification($this->jobId, $errorMessage));
}
}
public function clickElementWithJavaScript(Browser $browser, string $xPathSelector): void
{
$browser->script("
var element = document.evaluate('{$xPathSelector}', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
if (element) {
element.click();
} else {
console.error('Element not found: {$xPathSelector}');
}
");
}
}