diff --git a/src/main/java/org/openqa/selenium/htmlunit/BrowserVersionDeterminer.java b/src/main/java/org/openqa/selenium/htmlunit/BrowserVersionDeterminer.java index bd69967d..90e3c9cf 100644 --- a/src/main/java/org/openqa/selenium/htmlunit/BrowserVersionDeterminer.java +++ b/src/main/java/org/openqa/selenium/htmlunit/BrowserVersionDeterminer.java @@ -61,17 +61,10 @@ public static BrowserVersion determine(final Capabilities capabilities) { if (browserName.equalsIgnoreCase(BrowserVersion.CHROME.getNickname()) || "googlechrome".equalsIgnoreCase(browserName)) { browserVersionObject = BrowserVersion.CHROME; - } else if (browserName.equalsIgnoreCase(BrowserVersion.EDGE.getNickname()) || "MicrosoftEdge".equalsIgnoreCase(browserName)) { browserVersionObject = BrowserVersion.EDGE; - - } - else if (browserName.equalsIgnoreCase(BrowserVersion.INTERNET_EXPLORER.getNickname()) - || "internet explorer".equalsIgnoreCase(browserName)) { - browserVersionObject = BrowserVersion.INTERNET_EXPLORER; - } else if (browserName.equalsIgnoreCase(BrowserVersion.FIREFOX.getNickname()) || "firefox".equalsIgnoreCase(browserName)) { diff --git a/src/main/java/org/openqa/selenium/htmlunit/HtmlUnitAlert.java b/src/main/java/org/openqa/selenium/htmlunit/HtmlUnitAlert.java index 27198c6f..61964841 100644 --- a/src/main/java/org/openqa/selenium/htmlunit/HtmlUnitAlert.java +++ b/src/main/java/org/openqa/selenium/htmlunit/HtmlUnitAlert.java @@ -165,10 +165,7 @@ public String getText() { throw new NoAlertPresentException(); } String msg = holder_.message_; - msg = msg.replace("\r\n", "\n"); - if (!driver_.getBrowserVersion().isIE()) { - msg = msg.replace('\r', '\n'); - } + msg = msg.replace("\r\n", "\n").replace('\r', '\n'); return msg; } diff --git a/src/main/java/org/openqa/selenium/htmlunit/HtmlUnitDriver.java b/src/main/java/org/openqa/selenium/htmlunit/HtmlUnitDriver.java index a59d4164..ce0788bc 100644 --- a/src/main/java/org/openqa/selenium/htmlunit/HtmlUnitDriver.java +++ b/src/main/java/org/openqa/selenium/htmlunit/HtmlUnitDriver.java @@ -206,8 +206,7 @@ public HtmlUnitDriver(final BrowserVersion version, final boolean enableJavascri /** * The browserName is {@link Browser#HTMLUNIT} "htmlunit" and the * browserVersion denotes the required browser AND its version. For example - * "chrome" for Chrome, "firefox-100" for Firefox 100 or "internet explorer" for - * IE. + * "chrome" for Chrome, "firefox-100" for Firefox 100. * * @param capabilities desired capabilities requested for the htmlunit driver * session diff --git a/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitAlertTest.java b/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitAlertTest.java index 92fa050a..9487747c 100644 --- a/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitAlertTest.java +++ b/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitAlertTest.java @@ -131,12 +131,7 @@ public void alertWithLineBreak() throws Exception { driver.findElement(By.id("clickMe")).click(); // selenium seems to normalize this - if (getBrowserVersion().isIE()) { - assertEquals("1\n2\n3\t4\r5\n\r6", driver.switchTo().alert().getText()); - } - else { - assertEquals("1\n2\n3\t4\n5\n\n6", driver.switchTo().alert().getText()); - } + assertEquals("1\n2\n3\t4\n5\n\n6", driver.switchTo().alert().getText()); driver.switchTo().alert().dismiss(); } @@ -226,8 +221,7 @@ public void testSettingTheValueOfAnAlertThrows() throws Exception { @Alerts("Unexpected alert found: HtmlUnit is great") @BuggyWebDriver(DEFAULT = "unexpected alert open: {Alert text : HtmlUnit is great}", FF = "Dismissed user prompt dialog: HtmlUnit is great", - FF_ESR = "Dismissed user prompt dialog: HtmlUnit is great", - IE = "Modal dialog present with text: HtmlUnit is great") + FF_ESR = "Dismissed user prompt dialog: HtmlUnit is great") public void testIncludesAlertTextInUnhandledAlertException() throws Exception { final String html = "\n" + "\n" @@ -256,8 +250,7 @@ public void testIncludesAlertTextInUnhandledAlertException() throws Exception { @Alerts("Unexpected alert found: HtmlUnit is great") @BuggyWebDriver(DEFAULT = "unexpected alert open: {Alert text : HtmlUnit is great}", FF = "Dismissed user prompt dialog: HtmlUnit is great", - FF_ESR = "Dismissed user prompt dialog: HtmlUnit is great", - IE = "Modal dialog present with text: HtmlUnit is great") + FF_ESR = "Dismissed user prompt dialog: HtmlUnit is great") @NotYetImplemented public void testIncludesAlertTextInUnhandledAlertExceptionFromnAsyncScript() throws Exception { final String html = "\n" diff --git a/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitCapabilitiesTest.java b/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitCapabilitiesTest.java index 84f9e0a3..c2d23062 100644 --- a/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitCapabilitiesTest.java +++ b/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitCapabilitiesTest.java @@ -19,7 +19,6 @@ import static org.htmlunit.BrowserVersion.FIREFOX; import static org.htmlunit.BrowserVersion.FIREFOX_ESR; -import static org.htmlunit.BrowserVersion.INTERNET_EXPLORER; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -48,15 +47,16 @@ public class HtmlUnitCapabilitiesTest { @Test public void configurationViaDirectCapabilities() { - final DesiredCapabilities ieCapabilities = new DesiredCapabilities(Browser.IE.browserName(), "", Platform.ANY); + final DesiredCapabilities capabilities = + new DesiredCapabilities(Browser.CHROME.browserName(), "", Platform.ANY); try { - BrowserVersionDeterminer.determine(ieCapabilities); + BrowserVersionDeterminer.determine(capabilities); fail("IllegalArgumentException expected"); } catch (final IllegalArgumentException e) { assertEquals("When building an HtmlUntDriver, the capability browser name " - + "must be set to 'htmlunit' but was 'internet explorer'.", e.getMessage()); + + "must be set to 'htmlunit' but was 'chrome'.", e.getMessage()); } } @@ -108,13 +108,6 @@ public void configurationOfFirefoxEsrViaRemote() { assertEquals(FIREFOX_ESR, BrowserVersionDeterminer.determine(firefoxCapabilities)); } - @Test - public void configurationOfIEViaRemote() { - final DesiredCapabilities ieCapabilities = new DesiredCapabilities(Browser.HTMLUNIT.browserName(), - "internet explorer", Platform.ANY); - assertEquals(INTERNET_EXPLORER, BrowserVersionDeterminer.determine(ieCapabilities)); - } - @Test public void tetsDefautlBrowserVersion() { final DesiredCapabilities capabilities = diff --git a/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitDriverTest.java b/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitDriverTest.java index 07f051fa..3e845543 100644 --- a/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitDriverTest.java +++ b/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitDriverTest.java @@ -188,24 +188,6 @@ protected WebClient modifyWebClient(final WebClient client) { }; } - @Test - public void ctorWebClientBrowserVersionIE() { - new HtmlUnitDriver(BrowserVersion.INTERNET_EXPLORER) { - @Override - protected WebClient modifyWebClient(final WebClient client) { - - assertEquals(BrowserVersion.INTERNET_EXPLORER, client.getBrowserVersion()); - - assertFalse("client.getOptions().isJavaScriptEnabled() is true", - client.getOptions().isJavaScriptEnabled()); - assertFalse("client.isJavaScriptEnabled() is true", client.isJavaScriptEnabled()); - assertTrue("client.isJavaScriptEngineEnabled() is false", client.isJavaScriptEngineEnabled()); - - return client; - } - }; - } - @Test public void ctorWebClientBrowserVersionFirefoxJsFalse() { new HtmlUnitDriver(BrowserVersion.FIREFOX, false) { diff --git a/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitWebElementDomAttributeTest.java b/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitWebElementDomAttributeTest.java index 1052ea82..24292270 100644 --- a/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitWebElementDomAttributeTest.java +++ b/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitWebElementDomAttributeTest.java @@ -57,8 +57,7 @@ public void domAttribute() throws Exception { FF = "", FF_ESR = "") @HtmlUnitNYI(CHROME = "", - EDGE = "", - IE = "") + EDGE = "") public void unsupportedAttribute() throws Exception { final String html = "\n" + "\n" diff --git a/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitWebElementDomPropertyTest.java b/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitWebElementDomPropertyTest.java index af0112c5..2181f250 100644 --- a/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitWebElementDomPropertyTest.java +++ b/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitWebElementDomPropertyTest.java @@ -52,8 +52,7 @@ public void domProperty() throws Exception { } @Test - @Alerts(DEFAULT = "null", - IE = "true") + @Alerts("null") public void unsupportedAttribute() throws Exception { final String html = "\n" + "\n" diff --git a/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitWebElementTextTest.java b/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitWebElementTextTest.java index ad6b0f54..ebc85011 100644 --- a/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitWebElementTextTest.java +++ b/src/test/java/org/openqa/selenium/htmlunit/HtmlUnitWebElementTextTest.java @@ -41,11 +41,9 @@ public class HtmlUnitWebElementTextTest extends WebDriverTestCase { @Alerts(CHROME = " option1\n Number Three\n Number 4\n ", EDGE = " option1\n Number Three\n Number 4\n ", FF = "option1\nNumber Three\nNumber 4", - FF_ESR = "option1\nNumber Three\nNumber 4", - IE = "option1 Number Three Number 4") + FF_ESR = "option1\nNumber Three\nNumber 4") @HtmlUnitNYI(CHROME = "option1\nNumber Three\nNumber 4", - EDGE = "option1\nNumber Three\nNumber 4", - IE = "option1\nNumber Three\nNumber 4") + EDGE = "option1\nNumber Three\nNumber 4") public void select() throws Exception { final String html = "\n" diff --git a/src/test/java/org/openqa/selenium/htmlunit/WebDriverTestCase.java b/src/test/java/org/openqa/selenium/htmlunit/WebDriverTestCase.java index 8555251b..7a42a39a 100644 --- a/src/test/java/org/openqa/selenium/htmlunit/WebDriverTestCase.java +++ b/src/test/java/org/openqa/selenium/htmlunit/WebDriverTestCase.java @@ -19,7 +19,6 @@ import static java.nio.charset.StandardCharsets.ISO_8859_1; import static java.nio.charset.StandardCharsets.UTF_8; -import static org.htmlunit.BrowserVersion.INTERNET_EXPLORER; import static org.junit.Assert.fail; import java.io.File; @@ -108,9 +107,6 @@ import org.openqa.selenium.firefox.FirefoxOptions; import org.openqa.selenium.firefox.FirefoxProfile; import org.openqa.selenium.firefox.GeckoDriverService; -import org.openqa.selenium.ie.InternetExplorerDriver; -import org.openqa.selenium.ie.InternetExplorerDriverService; -import org.openqa.selenium.ie.InternetExplorerOptions; import org.openqa.selenium.remote.Browser; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.UnreachableBrowserException; @@ -125,7 +121,6 @@ browsers=hu,ff,ie chrome.bin=/path/to/chromedriver [Unix-like] ff-esr.bin=/usr/bin/firefox [Unix-like] - ie.bin=C:\\path\\to\\32bit\\IEDriverServer.exe [Windows] edge.bin=C:\\path\\to\\msedgedriver.exe [Windows] * The file could contain some properties: @@ -208,8 +203,7 @@ public abstract class WebDriverTestCase extends WebTestCase { Arrays.asList(BrowserVersion.CHROME, BrowserVersion.EDGE, BrowserVersion.FIREFOX, - BrowserVersion.FIREFOX_ESR, - BrowserVersion.INTERNET_EXPLORER)); + BrowserVersion.FIREFOX_ESR)); /** * Browsers which run by default. @@ -218,14 +212,12 @@ public abstract class WebDriverTestCase extends WebTestCase { {BrowserVersion.CHROME, BrowserVersion.EDGE, BrowserVersion.FIREFOX, - BrowserVersion.FIREFOX_ESR, - BrowserVersion.INTERNET_EXPLORER}; + BrowserVersion.FIREFOX_ESR}; private static final Log LOG = LogFactory.getLog(WebDriverTestCase.class); private static Set BROWSERS_PROPERTIES_; private static String CHROME_BIN_; - private static String IE_BIN_; private static String EDGE_BIN_; private static String GECKO_BIN_; private static String FF_BIN_; @@ -283,7 +275,6 @@ public static Set getBrowsersProperties() { BROWSERS_PROPERTIES_ = new HashSet<>(Arrays.asList(browsersValue.replaceAll(" ", "") .toLowerCase(Locale.ROOT).split(","))); CHROME_BIN_ = properties.getProperty("chrome.bin"); - IE_BIN_ = properties.getProperty("ie.bin"); EDGE_BIN_ = properties.getProperty("edge.bin"); GECKO_BIN_ = properties.getProperty("geckodriver.bin"); @@ -438,13 +429,6 @@ private static void quit(final WebDriver driver) { } } - /** - * Closes the real IE browser drivers. - */ - protected static void shutDownRealIE() { - shutDownReal(INTERNET_EXPLORER); - } - /** * Asserts all static servers are null. * @throws Exception if it fails @@ -510,20 +494,6 @@ public void setUseStandards(final boolean useStandards) { */ protected WebDriver buildWebDriver() throws IOException { if (useRealBrowser()) { - if (BrowserVersion.INTERNET_EXPLORER == getBrowserVersion()) { - if (IE_BIN_ != null) { - System.setProperty(InternetExplorerDriverService.IE_DRIVER_EXE_PROPERTY, IE_BIN_); - } - - final InternetExplorerOptions options = new InternetExplorerOptions(); - options.ignoreZoomSettings(); - - // clear the cookies - seems to be not done by the driver - final InternetExplorerDriver ieDriver = new InternetExplorerDriver(options); - ieDriver.manage().deleteAllCookies(); - return ieDriver; - } - if (BrowserVersion.EDGE == getBrowserVersion()) { if (EDGE_BIN_ != null) { final EdgeDriverService service = new EdgeDriverService.Builder() @@ -1038,7 +1008,7 @@ protected final WebDriver loadPage2(final String html, final URL url, protected void resizeIfNeeded(final WebDriver driver) { final Dimension size = driver.manage().window().getSize(); if (size.getWidth() != 1272 || size.getHeight() != 768) { - // only resize if needed because it may be quite expensive (e.g. IE) + // only resize if needed because it may be quite expensive driver.manage().window().setSize(new Dimension(1272, 768)); } } @@ -1389,13 +1359,6 @@ protected List getCollectedAlerts(final long maxWaitTime, final WebDrive // handling of alerts requires some time // at least for tests with many alerts we have to take this into account maxWait += 100; - - if (useRealBrowser()) { - if (getBrowserVersion().isIE()) { - // alerts for real IE are really slow - maxWait += 5000; - } - } } catch (final NoAlertPresentException e) { Thread.sleep(10); diff --git a/src/test/java/org/openqa/selenium/htmlunit/by/FindByClassNameTest.java b/src/test/java/org/openqa/selenium/htmlunit/by/FindByClassNameTest.java index 4d555273..247b4a93 100644 --- a/src/test/java/org/openqa/selenium/htmlunit/by/FindByClassNameTest.java +++ b/src/test/java/org/openqa/selenium/htmlunit/by/FindByClassNameTest.java @@ -110,7 +110,7 @@ public void relativeElementsByClassName() throws Exception { @Test @Alerts("testId") - @HtmlUnitNYI(CHROME = "", EDGE = "", FF = "", FF_ESR = "", IE = "") + @HtmlUnitNYI(CHROME = "", EDGE = "", FF = "", FF_ESR = "") public void caseInsensitiveByClassName() throws Exception { final String html = "\n" + "\n" diff --git a/src/test/java/org/openqa/selenium/htmlunit/html/HTMLImageElementTest.java b/src/test/java/org/openqa/selenium/htmlunit/html/HTMLImageElementTest.java index 6e126ea7..e2caf9ca 100644 --- a/src/test/java/org/openqa/selenium/htmlunit/html/HTMLImageElementTest.java +++ b/src/test/java/org/openqa/selenium/htmlunit/html/HTMLImageElementTest.java @@ -33,8 +33,7 @@ public class HTMLImageElementTest extends WebDriverTestCase { @Test @Alerts(DEFAULT = {"number: 300", "number: 200", "number: 24", "number: 24", "number: 24", "number: 24"}, CHROME = {"number: 300", "number: 200", "number: 16", "number: 16", "number: 16", "number: 16"}, - EDGE = {"number: 300", "number: 200", "number: 16", "number: 16", "number: 16", "number: 16"}, - IE = {"number: 300", "number: 200", "number: 28", "number: 30", "number: 28", "number: 30"}) + EDGE = {"number: 300", "number: 200", "number: 16", "number: 16", "number: 16", "number: 16"}) public void widthHeightInvalidSource() throws Exception { getMockWebConnection().setDefaultResponse(""); diff --git a/src/test/java/org/openqa/selenium/htmlunit/html/WindowsTest.java b/src/test/java/org/openqa/selenium/htmlunit/html/WindowsTest.java index 09f58a5a..5262c8d1 100644 --- a/src/test/java/org/openqa/selenium/htmlunit/html/WindowsTest.java +++ b/src/test/java/org/openqa/selenium/htmlunit/html/WindowsTest.java @@ -125,7 +125,6 @@ public void newWindowFromLinkWithTarget() throws Exception { * @throws Exception if something goes wrong */ @Test - // shift click seems not working with real IE public void newWindowFromShiftClick() throws Exception { final String html = "\n" diff --git a/src/test/java/org/openqa/selenium/htmlunit/html5/LocationContextTest.java b/src/test/java/org/openqa/selenium/htmlunit/html5/LocationContextTest.java index d16e2397..a877a2a3 100644 --- a/src/test/java/org/openqa/selenium/htmlunit/html5/LocationContextTest.java +++ b/src/test/java/org/openqa/selenium/htmlunit/html5/LocationContextTest.java @@ -39,8 +39,7 @@ public class LocationContextTest extends WebDriverTestCase { @Test @Alerts(DEFAULT = "LocationContext supported", FF = "LocationContext not supported", - FF_ESR = "LocationContext not supported", - IE = "LocationContext not supported") + FF_ESR = "LocationContext not supported") @HtmlUnitNYI(CHROME = "LocationContext not supported", EDGE = "LocationContext not supported") public void locationContext() throws Exception { diff --git a/src/test/java/org/openqa/selenium/htmlunit/html5/WebStorageTest.java b/src/test/java/org/openqa/selenium/htmlunit/html5/WebStorageTest.java index fd44b211..394c784a 100644 --- a/src/test/java/org/openqa/selenium/htmlunit/html5/WebStorageTest.java +++ b/src/test/java/org/openqa/selenium/htmlunit/html5/WebStorageTest.java @@ -37,8 +37,7 @@ public class WebStorageTest extends WebDriverTestCase { @Test - @Alerts(DEFAULT = "WebStorage supported", - IE = "WebStorage not supported") + @Alerts("WebStorage supported") @HtmlUnitNYI(CHROME = "WebStorage not supported", EDGE = "WebStorage not supported", FF = "WebStorage not supported", diff --git a/src/test/java/org/openqa/selenium/htmlunit/interactions/ClickTest.java b/src/test/java/org/openqa/selenium/htmlunit/interactions/ClickTest.java index c86aabff..2d714560 100644 --- a/src/test/java/org/openqa/selenium/htmlunit/interactions/ClickTest.java +++ b/src/test/java/org/openqa/selenium/htmlunit/interactions/ClickTest.java @@ -192,9 +192,7 @@ public void ctrlClick() throws Exception { FF = {"[object Event]", "undefined", "[object MouseEvent]", "1", "[object MouseEvent]", "2", "[object MouseEvent]", "1"}, FF_ESR = {"[object Event]", "undefined", "[object MouseEvent]", "1", - "[object MouseEvent]", "2", "[object MouseEvent]", "2"}, - IE = {"[object Event]", "undefined", "[object PointerEvent]", "0", - "[object PointerEvent]", "0", "[object PointerEvent]", "0"}) + "[object MouseEvent]", "2", "[object MouseEvent]", "2"}) public void detail() throws Exception { final String html = "