Protractor: Key.chord with CONTROL and SHIFT not working in IE 10

Created on 18 Apr 2015  ·  3Comments  ·  Source: angular/protractor

I've a following test running smoothly in Chrome and Firefox but not IE 10. After spending much time, I found that individual keys work fine, however, CONTROL and SHIFT together does not.

it('Should open panel with CTRL + SHIFT + 3', function() {
  browser.actions().sendKeys(protractor.Key.chord(protractor.Key.CONTROL, protractor.Key.SHIFT, '3')).perform();
  expect(browser.getCurrentUrl()).toContain('&menu=panel');
});

I'm using keypress.js input capture library and binding the same event as:

window.keypress['options'] = {is_solitary: true, prevent_repeat: true};
var listener = new window.keypress.Listener(document, window.keypress.options);
listener.simple_combo("ctrl shift 3", function(e) {
  alert('Hurrey..!');
});

Am I doing something wrong here? Please suggest.

IE external bug filed

All 3 comments

In IE11, unless you use requireWindowFocus: true, the CTRL+SHIFT modifier, like the following 2 examples, does not work.

browser.actions()
    .keyDown(protractor.Key.CONTROL)
    .mouseMove(element(by.id(...)))
    .click()
    .keyUp(protractor.Key.CONTROL)
    .perform();

browser.actions().mouseMove(this.getLanguage(name))
  .keyDown(protractor.Key.SHIFT)
  .click()
  .keyUp(protractor.Key.SHIFT)
  .perform();

I'm going to go ahead and close this since the external bug is filed and I don't think it's providing much value to keep track of it in our repo as well.

Was this page helpful?
0 / 5 - 0 ratings