title: Python selenium extract data from table and click
body: <p>Dear stackoverflow community,</p>
  
  <p>I recently ran into trouble trying to extract data from:</p>
  
  <pre><code>https://www2.sgx.com/securities/corporate-information?country=SINGAPORE
  </code></pre>
  
  <p>My purpose is to click each link in the table, starting from 3CNERGY LIMITED, which opens up another webpage tab, extract that, close that tab after extracting, go back to the main page, and click the next link.</p>
  
  <p>My issues are: 
  unable to find the element that lets me loop thru the table and 
  unable to switch from main webpage to tab and then back.</p>
  
  <p>My progress:
  i thought </p>
  
  <pre><code>&lt;sgx-table-list data-rendered-rows="20" data-visible-rows="10" style="min-width: 560px; transform: translateY(0px);" data-rendered-index="0" data-visible-index="0" xpath="1"&gt;
  </code></pre>
  
  <p>would allow me to loop thru the table but the len returns 1 only..</p>
  
  <p>i've been able to click the first webpage using:</p>
  
  <pre><code>CE = driver.find_element_by_xpath("//a[contains(@href, 'infopub')]")
  </code></pre>
  
  <p>but without being able to loop thru the table, the script just performs the first click. Also, i cant change it to find elements by xpath because it becomes a list and .click() doesn't work.</p>
  
  <p>Any help will be greatly appreciated. Thanks!!</p>