Fixes
All checks were successful
Push image to registry / build-image (push) Successful in 3m2s

This commit is contained in:
2025-09-14 13:28:47 +02:00
parent 2ae23de70d
commit 593f1f816e
2 changed files with 7 additions and 9 deletions

View File

@@ -155,20 +155,17 @@ class HellcaseJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
private function joinFreeGiveaways(Browser $browser)
{
try {
$buttons = $browser->driver->findElements(WebDriverBy::xpath('//button[./div[text()="join"]]'));
} catch (\Exception $e) {
$buttons = $browser->driver->findElements(WebDriverBy::xpath('//button[./div[text()="join"]]'));
if (sizeof($buttons) == 0) {
$browser->screenshot(JobDebugScreenshot::getFileName($this->jobId));
AllNotification::send(new JobDebugNotification($this->jobId, "No join for free buttons found"));
return;
}
if (sizeof($buttons) == 0) {
$this->jobRun->addArtifact(new JobArtifact([
"name" => "Pas de concours joignable",
"content" => ""
]));
return;
}
try {
// $nextSlideButton = $browser->driver->findElement(WebDriverBy::xpath('//button[@class="_button_1ygbm_7 _next_1ygbm_24"]'));
$nextSlideButton = "Button next slide is deactivated";
@@ -195,7 +192,8 @@ class HellcaseJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
}
sleep(5); // Wait a bit for loading
$this->joinGiveaway($browser);
// $this->joinGiveaway($browser);
$browser->within(new MainNav, function (Browser $browser) {
$browser->goToHome();
});