This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user