Merge pull request #48 from vogler/eg-unavailable-region
eg: skip if "This product is currently unavailable in your region"
This commit is contained in:
commit
7196a26070
1 changed files with 5 additions and 0 deletions
|
|
@ -145,6 +145,11 @@ try {
|
||||||
// it then creates an iframe for the purchase
|
// it then creates an iframe for the purchase
|
||||||
await page.waitForSelector('#webPurchaseContainer iframe'); // TODO needed?
|
await page.waitForSelector('#webPurchaseContainer iframe'); // TODO needed?
|
||||||
const iframe = page.frameLocator('#webPurchaseContainer iframe');
|
const iframe = page.frameLocator('#webPurchaseContainer iframe');
|
||||||
|
// skip game if unavailable in region, https://github.com/vogler/free-games-claimer/issues/46 TODO check games for account's region
|
||||||
|
if (await iframe.locator(':has-text("unavailable in your region")').count() > 0) {
|
||||||
|
console.error(' This product is unavailable in your region!');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
await iframe.locator('button:has-text("Place Order")').click();
|
await iframe.locator('button:has-text("Place Order")').click();
|
||||||
|
|
||||||
// I Agree button is only shown for EU accounts! https://github.com/vogler/free-games-claimer/pull/7#issuecomment-1038964872
|
// I Agree button is only shown for EU accounts! https://github.com/vogler/free-games-claimer/pull/7#issuecomment-1038964872
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue