title: Python Selenium - Source from href link
body: <p>I would like to be able to get the source page of the link I got from a <em>a href</em> without making Selenium changing page.</p>
  <p>I am getting the <em>a</em> element using</p>
  <pre><code>driver.find_element(By.XPATH, &quot;//a[contains(@class, 'css-1xyedec e1pf1lj70')]&quot;)
  </code></pre>
  <p>Then I can get the link in the href using</p>
  <pre><code>elem.get_attribute('href')
  </code></pre>
  <p>But I cannot find a way to get the source page of the link using selenium without changing the page of the browser.</p>
  <p>EDIT: <a href="https://www.leboncoin.fr/voitures/offres" rel="nofollow noreferrer">Here</a> is the website on which I am trying to do it. The <em>&lt;a&gt;</em> is located for each sale in each <em>div</em> that includes the photo and the part with the title, price...</p>