Я использую селен для имитации a. Проблема теперь в странице resulat selenium запутать в отображении значения текста: он показывает мне «parisl» в первом textFiled и «marseile» в второй. я не могу понять, в чем проблемаОшибка отображения страницы с селеном
Это мой код
public class SeleniumExample {
public static void main(String[] args) throws InterruptedException {
// The Firefox driver supports javascript
FirefoxProfile profile = new FirefoxProfile();
profile.setEnableNativeEvents(true);
RemoteWebDriver driver = new FirefoxDriver(profile);
// WebDriver driver = new FirefoxDriver();
// And now use this to visit Google
driver.get("http://www.voyages-sncf.com/");
// Find the text input element by its name
driver.findElement(By.name("origin_city")).sendKeys("paris");
driver.findElement(By.id("train-destination-city")).sendKeys("marseille");
Thread.sleep(4000);
driver.findElement(By.id("train-book")).click();}
}
Я думаю, что это проблема, вызванная автозаполнением сайта – asma