使用Playwright与Pyppeteer无法定位Dropbox登录页“Continue with Google”按钮的问题求助
Playwright与Pyppeteer无法定位Dropbox登录页“Continue with Google”按钮的问题求助
我在使用各类Python自动化工具(比如Playwright、Pyppeteer)时,总是定位不到Dropbox登录页上的“Continue with Google”按钮。
我试过在Chrome控制台里执行这段JS代码:
const element = [...document.querySelectorAll('span,button,div,a')].find(el => el.textContent.includes('Doorgaan met Google')); // Check if the element is found and click it if (element) { element.click(); console.log('Button clicked successfully!'); } else { console.error('Button not found!'); }
这段代码在Chrome里能正常找到并点击按钮,但在Firefox里就不行。更奇怪的是,我用Playwright和Pyppeteer写的程序里,哪怕直接执行这段相同的JS代码,也定位不到这个按钮。
有没有人知道这是什么原因导致的?
备注:内容来源于stack exchange,提问作者LLScheme
相关产品推荐
相关产品推荐

