Skip to content

keyDown() does not work with Internet Explorer Driver #1351

@Miro-H

Description

@Miro-H

I have tried to do it in different ways, but what works on Chrome (version 46.0.2490.86 m) and Firefox (version 42.0) won't work with IE 9.
Neither

browser.actions()
            .sendKeys(protractor.Key.chord(protractor.Key.CONTROL, '1'))
            .perform()

nor

browser.actions()
            .keyDown(protractor.Key.CONTROL)
            .sendKeys('1')
            .keyUp(protractor.Key.CONTROL)
            .perform();

work. I use protractor to send my tests to the selenium standalone server (which is on a VM which runs win7). Please tell me in case I overlooked something or if there is a workaround for this issue.

Full test:

describe('keyDown', function () {
    browser.ignoreSynchronization = true;
    browser.get('http://ci.seleniumhq.org:2310/common/keyboard_shortcut.html');

    it('should work with IE9', function () {
        browser.actions()
            .sendKeys(protractor.Key.chord(protractor.Key.CONTROL, '1'))
            .perform()

        expect(element(by.tagName('body')).getAttribute('style')).toContain('background: red');
    });
});

Thank you in advance,
Miro

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions