title: How to open each product within a website in a new tab for scraping using Selenium through Python
body: <p>I am scraping a web site using selenium  &quot;https://www.medline.com/catalog/category-products.jsp?itemId=Z05-CA02_03&amp;N=111079+4294770643&amp;iclp=Z05-CA02_03&quot;</p>
  <p>For single page and single product i am able to scrape by passing the product url but i am trying to do so by selenium i.e auto selection of product an page
  after select all the product one by one and it should move to next page and after opening product details page it should scrape which is done by beautiful soup here is product url from the base url &quot;https://www.medline.com/product/SensiCare-Powder-Free-Nitrile-Exam-Gloves/SensiCare/Z05-PF00342?question=&amp;index=P1&amp;indexCount=1&quot;</p>
  <p>Here is my code:</p>
  <pre><code>chromeOptions = webdriver.ChromeOptions()
  chromeOptions.add_experimental_option('useAutomationExtension', False)
  driver = webdriver.Chrome(executable_path='C:/Users/ptiwar34/Documents/chromedriver.exe', chrome_options=chromeOptions, desired_capabilities=chromeOptions.to_capabilities())
  driver.get(&quot;https://www.medline.com/catalog/category-products.jsp?itemId=Z05-CA02_03&amp;N=111079+4294770643&amp;iclp=Z05-CA02_03&quot;)
  
  while True:
      try:  
          WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, &quot;//div[contains(@class, 'resultGalleryViewRow')]//div[@class='medGridProdTitle']//a[contains(@href]&quot;))).click()
          print(&quot;Clicked for next page&quot;)
      except TimeoutException:
          print(&quot;No more pages&quot;)
          break
  driver.quit()
  </code></pre>
  <p>Here it does not throws error</p>
  <p>It does not open page for each product , I want to open each product in new tab and after scraping it delete and open the new tab for a new product</p>