Should fix steam connexion
Some checks failed
Push image to registry / build-image (push) Failing after 6m50s
Some checks failed
Push image to registry / build-image (push) Failing after 6m50s
This commit is contained in:
@ -11,6 +11,7 @@ use App\Notification\NotificationBody\Hellcase\HellcaseNotificationDailyFreeBody
|
||||
use App\Notification\NotificationBody\Hellcase\HellcaseNotificationLoginBody;
|
||||
use App\Notification\Notifications\Hellcase\HellcaseNotificationDailyFree;
|
||||
use App\Notification\Notifications\Hellcase\HellcaseNotificationLogin;
|
||||
use App\Notification\Notifications\JobErrorNotification;
|
||||
use App\Notification\Providers\AllNotification;
|
||||
use Facebook\WebDriver\WebDriverBy;
|
||||
use Illuminate\Contracts\Queue\ShouldBeUniqueUntilProcessing;
|
||||
@ -97,7 +98,13 @@ class HellcaseJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
|
||||
// QR CODE SCANNING
|
||||
try {
|
||||
$browser->waitForTextIn("div", "Or sign in with QR", 30, true);
|
||||
$qrCode = $browser->driver->findElement(WebDriverBy::xpath('//div[./*[contains(text(), "Or sign in with QR")]]'));
|
||||
sleep(10);
|
||||
try {
|
||||
$qrCode = $browser->driver->findElement(WebDriverBy::xpath('//div[./*[contains(text(), "Or sign in with QR")]]'));
|
||||
} catch (\Exception $e) {
|
||||
AllNotification::send(new JobErrorNotification($this->jobId, "Le QR code de la page de connexion de Steam n'a pas été trouvé"));
|
||||
throw $e;
|
||||
}
|
||||
|
||||
// Wait to be redirected to the Steam login page, while waiting take a new screenshot every 30 seconds
|
||||
$isBackOnHellcase = false;
|
||||
@ -122,9 +129,11 @@ class HellcaseJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// If the QR code is not found, we are not on the QR code page
|
||||
Log::debug("Exception because qrcode not found : " . $e);
|
||||
$isBackOnHellcase = true;
|
||||
} catch (\Throwable $e) {
|
||||
// If the QR code is not found, we are not on the QR code page
|
||||
Log::debug("Exception because qrcode not found : " . $e);
|
||||
$isBackOnHellcase = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user