Change visit by js window.open
This commit is contained in:
@ -30,8 +30,8 @@ class EpicGamesJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
|
||||
|
||||
public function run(Browser $browser): ?JobRun
|
||||
{
|
||||
$browser->visit("https://bscscan.com/contractsVerified");
|
||||
sleep(3);
|
||||
// $browser->visit("https://bscscan.com/contractsVerified");
|
||||
// sleep(3);
|
||||
Log::info("Running " . self::class);
|
||||
$this->jobRun = new JobRun([
|
||||
"job_id" => $this->jobId,
|
||||
@ -89,7 +89,8 @@ class EpicGamesJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
|
||||
|
||||
private function signin(Browser $browser)
|
||||
{
|
||||
$browser->visit("https://store.epicgames.com/login?state=%2Fen-US%2F");
|
||||
// $browser->visit("https://store.epicgames.com/login?state=%2Fen-US%2F");
|
||||
$browser->driver->executeScript('window.open("https://store.epicgames.com/login?state=%2Fen-US%2F")');
|
||||
sleep(5);
|
||||
$this->assertNotDetected($browser);
|
||||
$browser->waitForText("Sign In", 30, true);
|
||||
@ -107,7 +108,8 @@ class EpicGamesJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
|
||||
|
||||
private function getFreeGames(Browser $browser)
|
||||
{
|
||||
$browser->visit('https://www.epicgames.com/store/en-US/free-games');
|
||||
$browser->driver->executeScript('window.open("https://www.epicgames.com/store/en-US/free-games")');
|
||||
// $browser->visit('https://www.epicgames.com/store/en-US/free-games');
|
||||
$browser->waitForText("Free Games", 30, true);
|
||||
$freeGamesLinkElements = $browser->driver->findElements(WebDriverBy::xpath('//a[contains(@aria-label, "Free Now")]'));
|
||||
$freeGamesLinks = [];
|
||||
|
Reference in New Issue
Block a user