title: How to select a different language on a website with selenium
body: <p>This is an open site with tax information. I access the site, click on 'Abzüge', then the next page is in English. I try to change to German, however, I cannot locate the button. My current code is</p>
  <pre><code>from selenium import webdriver
  driver = webdriver.Chrome('/path-to-my-chromedriver/chromedriver')
  driver.get('https://www.estv.admin.ch/estv/de/home/allgemein/steuerstatistiken/fachinformationen/steuerbelastungen/steuerfuesse.html')
  elem1 = driver.find_element_by_link_text('Abzüge')
  elem1.click()
  de = driver.find_element_by_xpath('/html/body/div/div[4]/header/div/div[2]/div/button[1]')
  de.click()
  driver.close()
  </code></pre>
  <p>The Error is <code>NoSuchElementException: Message: no such element: Unable to locate element: {&quot;method&quot;:&quot;xpath&quot;,&quot;selector&quot;:&quot;/html/body/div/div[4]/header/div/div[2]/div/button[1]&quot;} (Session info: chrome=85.0.4183.102)</code></p>
  <p>I have also tried to find the button by class and by shorter xPaths, but I can never locate the button.</p>
  <p>I also need to select some buttons in the main field. So I gave that a try as well, but it does not work as well. My code to select Whole of Switzerland, without changing to German, is</p>
  <pre><code>element = driver.find_element_by_xpath('//*[@id=&quot;LOCATION&quot;]/div[2]/div[1]/div[1]/div/div/div[2]')
  element.click()
  </code></pre>
  <p>I get the same error, <code>NoSuchElementException</code>.</p>
  <p>How would I change the language on the webpage, and how would I select a button in the body?</p>