This repository was archived by the owner on Nov 29, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 195
This repository was archived by the owner on Nov 29, 2018. It is now read-only.
driver.quit not working against browser IEv9 #3324
Copy link
Copy link
Closed
Description
Originally reported on Google Code with ID 3324
What steps will reproduce the problem?
-inserting driver.quit in my test is not killing IE browser
What is the expected output? What do you see instead?
-the IE browser just remains open after test has been completed, expecting browser
to close.
Selenium version: webdriver 2.18.0
OS: win7 (64)
Browser: Internet Explorer
Brower version: 9
sample code below:
import org.testng.annotations.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.ie.InternetExplorerDriver;
//import org.openqa.selenium.htmlunit.HtmlUnitDriver;
//import org.openqa.selenium.ie.InternetExplorerDriver;
public class Selenium2FirstTest {
@Test
public void testSelenium2() throws InterruptedException {
/*
* Firefox driver is cool, it supports javascript and offers a lot of
* features You can also use the below drivers WebDriver driver = new
* InternetExplorerDriver(); WebDriver driver = new HtmlUnitDriver();
*/
System.out.println("about to create driver");
WebDriver driver = new InternetExplorerDriver();
try {
System.out.println("about to get()");
// Go to Google Home Page
driver.get("http://www.google.com");
// Look for search textbox and enter search term there
WebElement searchBox = driver.findElement(By.name("q"));
searchBox.sendKeys("WebDriver API");
// Click on 'Search'
WebElement searchButton = driver.findElement(By.name("btnK"));
searchButton.click();
// Close the driver, once you're done.
driver.quit();
} catch (Exception e) {
e.printStackTrace(); // For debugging purposes
}
}
}
Reported by fishy_fingerss@yahoo.co.uk
on 2012-02-02 10:53:27