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