feat: improve Get button locator
This commit is contained in:
parent
335c4b0292
commit
43c2df7e4a
1 changed files with 1 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ for (let i = 1; i <= n; i++) {
|
||||||
console.log('This game contains mature content recommended only for ages 18+');
|
console.log('This game contains mature content recommended only for ages 18+');
|
||||||
await page.click('button:has-text("Continue")');
|
await page.click('button:has-text("Continue")');
|
||||||
}
|
}
|
||||||
const btnText = await page.locator('[data-testid="purchase-cta-button"]').first().innerText();
|
const btnText = await page.locator('//button[@data-testid="purchase-cta-button"][not(contains(.,"Loading"))]').first().innerText();
|
||||||
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