title: How to forward to another subpage
body: <p>Today I started my first project in Selenium with Python.
  I'm going to write a program that will automate buying items on a
  website. I'm going to expand functions of this bot in future updates, but right now I need that first thing done.</p>
  
  <p>What the program should do right now:</p>
  
  <ol>
  <li>Program has to login to site</li>
  <li>Program has to forward to subsite - here is problem. I'm getting logged off from site and next step of course doesn't work.</li>
  <li>Program has to choose size and then click "add to cart."</li>
  </ol>
  
  <p>The program works fine if I don't use forwarding but click on the next parts of the site. This means that if I want to get forwarded from the home page to the product page it doesn't work - I get logged off. When I click, for example, home -> shoes -> name of shoe, everything works fine.</p>
  
  <pre><code>from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  from selenium.webdriver.support.ui import WebDriverWait
  import time
  
  browser = webdriver.Chrome(executable_path=r'C:\Users\damia\Desktop\chromedriver.exe')
  
  stronaLog="https://www.zalando-lounge.pl/#/login"
  stronaKup="https://www.zalando-lounge.pl/campaigns/ZZO0TCY/categories/5999626/articles/AD115O085-A12"
  
  #getting to the site
  browser.get(stronaLog)
  
  #logging
  email = browser.find_element_by_id('form-email').send_keys('myemail')
  password = browser.find_element_by_id('form-password').send_keys('mypass' + Keys.ENTER)
  time.sleep(1)
  
  #save cookies
  cookie={'name': 'MojCiasteczek', 'value':'666666'}
  browser.add_cookie(cookie)
  
  #forwading to next site and buying product
  browser.get(stronaKup)
  browser.find_element_by_xpath("//*[contains(text(), '41 1/3')]").click()
  browser.find_element_by_css_selector('#addToCartButton &gt; div.articleButton___add-to-cart___1Nngf.core___flipper___3yDf4').click()
  </code></pre>