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