title: How to get through log in asking for phone verification?
body: <p>I'm trying to automate a lot of my job which requires me to log in to SalesForce (a sales management program). Since I don't want to learn all the API I want to automate it externally through xpath and stuff. The big problem is that whenever I try to log in on Salesforce, it recognizes a computer is doing the log in and asks for a verification code to my cellphone, which makes any further action absolutely unfeasible. Can someone please help?</p>
  
  <pre><code>from selenium import webdriver
  chromedriver = "/Users/sebastiendupont/Downloads/chromedriver"
  driver = webdriver.Chrome(chromedriver)
  driver.get("https://bus.my.salesforce.com/?ec=302&amp;startURL=%2Fvisualforce%2Fsession%3Furl%3Dhttps%253A%252F%252Fbus.lightning.force.com%252Flightni`enter code here`ng%252Fpage%252Fhome")
  xpath = '//*[@id="username"]'
  box = driver.find_element_by_xpath(xpath)
  box.send_keys('mygmail')
  xpath2 = '//*[@id="password"]'
  box2 = driver.find_element_by_xpath(xpath2)
  box2.send_keys('mypassword')
  box.submit()
  </code></pre>