title: How to input text into steam guard prompt with selenium?
body: <p>Been trying to use selenium to scrape steam-game related sites, but can't figure out how to get selenium to find the Steam Guard textbox and 'Enter' button. Instead I get the error that</p>
  <pre><code>NameError: name 'authbox' is not defined
  </code></pre>
  <p>Which means Selenium couldn't assign the authbox variable to a html element.</p>
  <p>Code below, you'll need to input some valid steam login for the steam guard prompt to show up:</p>
  <pre><code>import time
  import requests, bs4
  from selenium import webdriver
  from selenium.webdriver.support.ui import WebDriverWait
  
  # Steam username
  username = 'usernamehere'
  # Steam password
  password = 'passwordhere'
  authcode = &quot;FAKE&quot;
  delay = 1
  
  #Using selenium to log in and then get the page
  browser = webdriver.Chrome()
  browser.get('https://scrap.tf/buy/hats')
  #Log into steam then proceed to new page
  userbox = browser.find_element_by_name(&quot;username&quot;)
  userbox.send_keys(username)
  passbox = browser.find_element_by_name(&quot;password&quot;)
  passbox.send_keys(password)
  signin = browser.find_element_by_id(&quot;imageLogin&quot;)
  #signin.click()
  time.sleep(delay)
  authbox.send_keys(authcode)
  submitBtn = browser.find_element_by_class(&quot;auth_button leftbtn&quot;)
  submitBtn.click()
  </code></pre>
  <p>TL;DR: How do I get selenium to recognize the steam guard prompt textbox after pressing &quot;login&quot;? If the code works correctly, it should input &quot;FAKE&quot; into the textbox</p>