Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

sendKeys on IE 11 does update DOM, sometimes doesn't update ngModel correctly #2271

Open
@ondrejhanslik

Description

@ondrejhanslik

Hello,

I have been inspecting some of our tests which were consistenly failing on IE 11 (while running correctly on Firefox and Chrome).

The tests are typing search text into an input and confirming with enter. The test then checks if a suggestion box shows the recent searches correctly. I am using a helper function that looks like this:

createRecent: function (recent) {
    searchEl.sendKeys(recent);
    return searchEl.getAttribute('value').then(function (currentValue) {
        return searchEl.evaluate('input.text').then(function (modelValue) {
           console.log('Writing value: \'' + recent + '\',', 'written value: \'' + currentValue + '\'', 'model value: \'' + modelValue + '\'');
        });
    }).then(function () {
        return searchEl.sendKeys(protractor.Key.ENTER);
    });
},

The output is the following:

Writing value: 'recent-i', written value: 'recent-i' model value: 'recent-'
Writing value: 'recent-b', written value: 'recent-b' model value: 'recent-b'
Writing value: 'recent-h', written value: 'recent-h' model value: 'recent-h'
Writing value: 'recent-c', written value: 'recent-c' model value: 'recent-c'
Writing value: 'recent-d', written value: 'recent-d' model value: 'recent-d'
Writing value: 'recent-e', written value: 'recent-e' model value: 'recent-e'
Writing value: 'recent-f', written value: 'recent-f' model value: 'recent-f'
Writing value: 'recent-a', written value: 'recent-a' model value: 'recent-a'
Writing value: 'recent-g', written value: 'recent-g' model value: 'recent-g'
Writing value: 'recent-j', written value: 'recent-j' model value: 'recent-j'

Note the first value was correctly written into the input but the underlaying ngModel value was not updated correctly. This doesn't happen always but it happens rather frequently (1 in every 10).

The input is rather basic, it has a ng-model with no parsers/formatters, only with a keyDown handler that handles the enter key.

I am not sure if this is an error in protractor, selenium or angular.
Selenium server 2.46.0 and browser running on Win 7, 64 bit. IE 11 with a 32bit driver.
Protractor 2.1.0

This might be connected with #2019

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions