title: How to command click (open in new tab) in selenium
body: <p>I have an array of <code>selenium.webdriver.remote.webelement.WebElement</code>s. In order to loop through theses elements and keep the session, I need to open each element in a new tab, extract the data, then close the tab. I see THAT there is a way to open a new tab, but it requires a url: <a href="https://stackoverflow.com/questions/17547473/how-to-open-a-new-tab-using-selenium-webdriver-in-java">How to open a new tab using Selenium WebDriver in Java?</a> . Is there any way to command click these elements?</p>
  <p>SOURCE: <a href="https://www.selenium.dev/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webelement.html" rel="nofollow noreferrer">https://www.selenium.dev/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webelement.html</a></p>
  <pre><code>    def click(self) -&gt; None:
          &quot;&quot;&quot;Clicks the element.&quot;&quot;&quot;
          self._execute(Command.CLICK_ELEMENT)
  </code></pre>