WebDriver works on Chrome but no on Internet Explorer
Hello im using webdriver and first time works excellent, but the next day
it only works on google chrome with the same code, on IE says that cant
find the element and im using a very simple code that is:
public class Test {
public static void main(String[] args) throws InterruptedException {
//WebDriver driver = new InternetExplorerDriver();
WebDriver driver = new ChromeDriver();
driver.get("http://www.google.com");
Thread.sleep(3000);
WebElement element = driver.findElement(By.name("q"));
element.sendKeys("ELTUTO");
}
and the error says:
Exception in thread "main" org.openqa.selenium.NoSuchWindowException:
Unable to find element on closed window (WARNING: The server did not
provide any stacktrace information) Command duration or timeout: 14
milliseconds Build info: version: '2.33.0', revision: '4e90c97', time:
'2013-05-22 15:33:32' System info: os.name: 'Windows 7', os.arch: 'x86',
os.version: '6.1', java.version: '1.7.0_25'
Only says that when im exceuting on IE on google chrome works good
No comments:
Post a Comment