Skip to content

Commit 3d4217c

Browse files
committed
Change assertion for IE<10 to reflect that the cursor position
is not preserved when changing focus.
1 parent b528ca5 commit 3d4217c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

javascript/webdriver/test/atoms/inject/interactions_test.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
goog.require('bot.inject.cache');
1010
goog.require('bot.json');
1111
goog.require('bot.response');
12+
goog.require('bot.userAgent');
1213
goog.require('goog.array');
1314
goog.require('goog.testing.jsunit');
1415
goog.require('webdriver.Key');
@@ -75,7 +76,13 @@
7576

7677
focusElement(input);
7778
doType(['bar', webdriver.Key.SHIFT, 'baz'], state);
78-
assertEquals('fooBARbaz', input.value);
79+
80+
// IE<10 does not preserve cursor position after chaning focus.
81+
if (bot.userAgent.IE_DOC_PRE10) {
82+
assertEquals('BARbazfoo', input.value);
83+
} else {
84+
assertEquals('fooBARbaz', input.value);
85+
}
7986

8087
function doType(keys, opt_state) {
8188
var res = webdriver.atoms.inject.action.sendKeysToActiveElement(

0 commit comments

Comments
 (0)