Skip to content

Commit b58bc8c

Browse files
committed
Updating textContent attribute test for IE9
The test page is loaded in Quirks mode in IE9, which means that IE doesn't return a textContent attribute for that page. The alternatives are to force the test page to load in Standards mode by adding a doctype, or ignore the test for IE9. This commit chooses the latter approach.
1 parent 7ee7a23 commit b58bc8c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dotnet/test/common/ElementAttributeTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ public void ShouldTreatReadonlyAsAValue()
249249
[Test]
250250
public void ShouldReturnHiddenTextForTextContentAttribute()
251251
{
252-
if (TestUtilities.IsOldIE(driver))
252+
if (!TestUtilities.IsIE10OrHigher(driver))
253253
{
254-
Assert.Ignore("IE 8 or below does not handle textContent attribute");
254+
Assert.Ignore("IE8 or below does not handle textContent attribute; IE9 loads page in quirks mode, so no textContent attribute");
255255
}
256256

257257
driver.Url = simpleTestPage;

java/client/test/org/openqa/selenium/ElementAttributeTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public void testShouldTreatReadonlyAsAValue() {
253253

254254
@Test
255255
public void testShouldReturnHiddenTextForTextContentAttribute() {
256-
assumeFalse("IE before 9 doesn't handle textContent attribute", TestUtilities.isOldIe(driver));
256+
assumeFalse("IE before 9 doesn't handle textContent attribute; IE9 loads page in quirks mode, so no textContent attribute", TestUtilities.getIEVersion(driver) < 10);
257257

258258
driver.get(pages.simpleTestPage);
259259

0 commit comments

Comments
 (0)