Skip to content

Commit

Permalink
Change assertion for IE<10 to reflect that the cursor position
Browse files Browse the repository at this point in the history
is not preserved when changing focus.
  • Loading branch information
jleyba committed Jan 16, 2014
1 parent b528ca5 commit 3d4217c
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
goog.require('bot.inject.cache');
goog.require('bot.json');
goog.require('bot.response');
goog.require('bot.userAgent');
goog.require('goog.array');
goog.require('goog.testing.jsunit');
goog.require('webdriver.Key');
Expand Down Expand Up @@ -75,7 +76,13 @@

focusElement(input);
doType(['bar', webdriver.Key.SHIFT, 'baz'], state);
assertEquals('fooBARbaz', input.value);

// IE<10 does not preserve cursor position after chaning focus.
if (bot.userAgent.IE_DOC_PRE10) {
assertEquals('BARbazfoo', input.value);
} else {
assertEquals('fooBARbaz', input.value);
}

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

0 comments on commit 3d4217c

Please sign in to comment.