I try login to Salesforce whit this script, but it launches the page of verification of identity. The user and password are working, so how can I avoid the verification page?
To login into the Salesforce Web Application as the AUT is based on Lazy Loading you have to induce WebDriverWait for the elements to be clickable as follows:
driver.get("https://test.salesforce.com/");
new WebDriverWait(driver, 20).until(ExpectedConditions.elementToBeClickable(By.cssSelector("input.input.username#username"))).sendKeys("RodrigoC");
driver.findElement(By.cssSelector("input.input.password#password")).sendKeys("RodrigoC");
driver.findElement(By.cssSelector("input.button.wide.primary")).click();
To avoid identity verification, you can go to the Salesforce organization you're using and mark your IP as trusted. Once you do that, you will be able to log in without two-factor authentication for all future test runs (as long as they use the same IP).
To mark your IP as trusted, go to Setup - Security Controls - Network Access.