DEV Community

Discussion on: Automated Dapps Scrapping with Selenium and Metamask

Collapse
 
baotran810 profile image
baotran810 • Edited

Hi Federico,
I also got the issue "NoSuchElementException" because it couldn't locate the "Get started" button. While debugging, I found that it focused on the first page when I ran the script, so I switched to the first tab to close then it only focused on the MetaMask page then the "Get started" button was able to locate. Here is the script I used, I hope it would help you.

await driver.getAllWindowHandles().then(function (handles) {
driver.switchTo().window(handles[1]);
driver.close()
driver.switchTo().window(handles[0]);
});

Thread Thread
 
fedeblengio profile image
Federico Blengio

Thank you

Thread Thread
 
fedeblengio profile image
Federico Blengio

I have a question to ask about handles, you can send a dm?

Thread Thread
 
escaraptor09 profile image
Marc Ferri

How did you finally solved it?????