title: Python Selenium Webdriver change url after login and remain logged in
body: <p>Currently creating a <strong>scraper</strong> where I scrape sales data, but too see them I must first login and navigate to it.</p>
  <p>Manual navigation is possible by pressing a bunch of buttons, but if I know the end url, is it somehow possible to navigate to the url after I have automated the logging process with Selenium webdriver?</p>
  <p>See example:</p>
  <pre><code>driver.get(&quot;https://ui8.net/&quot;)
  print(&quot;Trying to log in on UI8&quot;)
  
  driver.implicitly_wait(15)
  
  driver.find_element_by_xpath(
      &quot;/html/body/div[1]/header/div[2]/div[2]/a&quot;).click()
  
  email_input = driver.find_element_by_id(&quot;login-email&quot;)
  password_input = driver.find_element_by_id(&quot;login-password&quot;)
  
  email_input.send_keys(data[&quot;login&quot;])
  password_input.send_keys(data[&quot;pw&quot;])
  
  driver.find_element_by_id(&quot;login-button&quot;).click()
  
  print(&quot;Logged in on UI8&quot;)
  # TODO: Somehow need to get to this url https://ui8.net/affiliate/sales
  </code></pre>
  <p>If I simply do <code>driver.get(&quot;https://ui8.net/affiliate/sales&quot;)</code> after I have logged in, it is going to open a new tab but I wont be logged in anymore.</p>
  <p>I can simply press and hover over a bunch of things until I reach that url, but I feel like I can just href to it somehow?</p>
  <p>Anyone has any ideas? There is the <code>driver.navigate().to()</code> but this does not seem to work in python.</p>