title: Python Selenium : Page is closed when accepting cookies
body: <p>I'm trying to get data from the url : <a href="https://www.vinted.fr/femmes/vetements" rel="nofollow noreferrer">https://www.vinted.fr/femmes/vetements</a> by using scraping. When we open the url we must click on a button to accept cookies. I'm doing this to do it in selenium :</p>
  <pre><code>driver.get(url)
  time.sleep(5)
  
  button = driver.find_element(By.ID,&quot;onetrust-accept-btn-handler&quot;)   
  button.click() 
  </code></pre>
  <p>But when I'm doing this, the page is shut down and it doesn't execute the rest of my code. Can anyone help me with this please ?</p>