-1

I have a classic Selenium script (in jupyter notebook) for scraping a website.I run that script and craweled hundreds of pages (clicking next-next) and finally an exception occured. Browser window is open with that session. Now I want to rerun that script from where I left in the same window maybe, before error occured. How is it possible?

Fuad Ak
  • 158
  • 8
  • Does this answer your question? [Can Selenium interact with an existing browser session?](https://stackoverflow.com/questions/8344776/can-selenium-interact-with-an-existing-browser-session) – SiKing Mar 31 '21 at 19:00

1 Answers1

0

Yes, your code probably starts with opening new browser window and getting the url such as

driver=Chrome(executable_path='chromedriver.exe')
driver.get(url)

Just comment out that lines in the next run and your code will run in the current open window where you left.

Fuad Ak
  • 158
  • 8