나는 joda 시간이있는 웹 사이트에 세 개의 필드가 있습니다. Firefox에서는 모든 것이 잘 작동합니다. 그러나 IE에서는 IRB 만료 날짜 필드에 시작 날짜 및 종료 날짜 필드가 채워지지 않습니다. 이견있는 사람? 이것은 IE9에서입니다. joda 시간의 최신 버전으로 업데이트했으며 여전히 기쁨을 얻지 못하고 있습니다. WebDriver와 IEDriver를 2.37로 업데이트했습니다. 콘솔에 보낼 때 시간이 제대로 출력되고 있습니다.sendKeys Not IE IE
1.)을 선택하고 요소에 GET 초점을 할 수 있는지 확인하십시오 :
//Enter an IRB Expiration Date - This is the one which works
WebElement irbExpCP = driver.findElement(By.id("irbExpDate"));
irbExpCP.click();
LocalDate irbDate = LocalDate.now().plusYears(5);
DateTimeFormatter formatter = DateTimeFormat.forPattern("MM/dd/yyyy");
String irbDate2 = formatter.print(irbDate);
irbExpCP.sendKeys(irbDate2);
//Enter a Start Date
WebElement startDateCP = driver.findElement(By.id("startDate"));
startDateCP.click();
LocalDate startDate = LocalDate.now();
String startDate2 = formatter.print(startDate);
startDateCP.sendKeys(startDate2);
//Enter an End Date
WebElement endDateCP = driver.findElement(By.id("endDate"));
endDateCP.click();
LocalDate endDate = LocalDate.now().plusYears(10);
String endDate2 = formatter.print(endDate);
endDateCP.sendKeys(endDate2);
3 개의 동일한 'DateTimeFormatter' 개체를 왜 만들어야합니까? 요소가 발견되는지 여부를 확인하기 위해 진단을 수행 했습니까? 이것은 Joda Time 문제보다 Selenium/WebDriver 문제가 더 많다는 느낌이 들었습니다. –
그게 도움이 될 거라 생각했는데, 그걸 제거하지 못했습니다. 나는'System.out.println (startDate2)'와'System.out.println (endDate2)'를했다. Joda Time은 올바른 일을하는 것처럼 보인다. 나는이 질문을 다시 분류 할 것이다. 귀하의 가정은 정확합니다, 이것은 joda 시간보다 webDriver 문제가 더 많이 보입니다. – DarthOpto
테스트가 실패하거나 기다릴 수 있습니까? –