I don't have the rep to comment on this question, so I'll have to add my own.
I want to automate testing of the SF Oauth server auth flow. I can go through it manually, and everything works, but when I run my test (Selenium, chromedriver, using the same credentials, I get an email with the title "Verify your identity in Salesforce", which contains (redacted) this:
You recently logged in to Salesforce from a device we don't recognize.
Browser: Chrome Operating System: Linux Username: [email]
To ensure your account's security, we need to verify your identity. Enter the following code where prompted by Salesforce.
Verification Code: [code]
I take screenshots throughout the process. My screenshot for after I click on the Salesforce oauth window's "Login" button does not show anything, other than the form.
I don't think this is due to Multi-factor auth, which is not set on my account. I think it's happening because Salesforce does some "bot check", recognizes my test is not a 'real user', and triggers the email. My screenshots don't show any alert or new window, so even if I went to the trouble of getting the email programatically, I wouldn't know how to use the verification code.