we want to transfer our tests to selenium 2, and I found a problem that I donβt know how to solve.
I use the following commands for webdriver:
WebDriver driver = new InternetExplorerDriver(); driver.navigate().to("webapp"); Thread.sleep(3000); System.out.println(driver.getPageSource()); WebElement element = driver.findElement(By.id("someid"));
An exception is thrown on the last line and the item was not found. The same example works well in firefox, but we need it to be in IE. I tried to add more sleep, but that will not help. The getPageSource method returns the correct html.
I also tried to get the body tag with the following command, but it returns null.
List<WebElement> list = driver.findElements(By.tagName("body"));
Our web application is created in gwt.
Do you know what can lead to the fact that selenium does not see any element?
source share