Skip to content

Commit be25803

Browse files
committed
Updating naive user agent string checks to account for IE11
1 parent debd05e commit be25803

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

common/src/web/rich_text.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323

2424
window.onload = function () {
2525
// Super dumb browser detection
26-
var isIE = window.navigator.userAgent.search('MSIE') != -1;
26+
var isIE = window.navigator.userAgent.search('MSIE') != -1
27+
|| window.navigator.userAgent.search('Trident') != -1;
2728

2829
var editFrame = document.getElementById('editFrame').contentWindow;
2930
setKeypressHandler(editFrame.document, printEventData);

java/client/test/org/openqa/selenium/testing/TestUtilities.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ public static boolean isFirefox(WebDriver driver) {
5656
}
5757

5858
public static boolean isInternetExplorer(WebDriver driver) {
59+
String userAgent = getUserAgent(driver);
5960
return !(driver instanceof HtmlUnitDriver)
60-
&& getUserAgent(driver).contains("MSIE");
61+
&& (userAgent.contains("MSIE") || userAgent.contains("Trident"));
6162
}
6263

6364
public static boolean isIe6(WebDriver driver) {

0 commit comments

Comments
 (0)