epic-games: save data/screenshots/epic-games/title.png for each game, not fullPage
This commit is contained in:
parent
0d847c479a
commit
2ae513f6c0
1 changed files with 2 additions and 0 deletions
|
|
@ -73,6 +73,8 @@ try {
|
||||||
await page.click('button:has-text("Continue")');
|
await page.click('button:has-text("Continue")');
|
||||||
}
|
}
|
||||||
const btnText = await page.locator('//button[@data-testid="purchase-cta-button"][not(contains(.,"Loading"))]').first().innerText();
|
const btnText = await page.locator('//button[@data-testid="purchase-cta-button"][not(contains(.,"Loading"))]').first().innerText();
|
||||||
|
const p = path.resolve(dirs.screenshots, 'epic-games', `${title.replace(/[^a-z0-9]/gi, '_')}.png`);
|
||||||
|
await page.screenshot({ path: p, fullPage: false }); // fullPage is quite long...
|
||||||
if (btnText.toLowerCase() == 'in library') {
|
if (btnText.toLowerCase() == 'in library') {
|
||||||
console.log('Already in library! Nothing to claim.');
|
console.log('Already in library! Nothing to claim.');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue