量角器 TAB 键已停止改变焦点,现在正在添加空格

Protractor TAB key has stopped changing focus and is now adding spaces

我们有一些使用 TAB 键将焦点切换到下一个输入字段的量角器测试,效果很好。

在过去几天的某个地方,它已停止更改焦点,现在改为添加空格。

有人遇到过这种行为变化吗?

谢谢!

    var tab = protractor.Key.TAB;

    describe('testing', function() {
      it('Should do stuff.', function() {
        browser.ignoreSynchronization = true; // for non angular page.

        browser.get('http://www.google.com');
        browser.sleep(1000);
        $('.gsfi').sendKeys('123');
        browser.sleep(1000); // have some time to look.
        browser.actions().sendKeys(protractor.Key.TAB).perform(); //different methods, same effect.
        $('.gsfi').sendKeys(tab); // different methods, same effect.
      });
    });

这似乎是 Chrome 44 中的回归。我已经指出了 an issue in Protractor bug tracker in comments. Here is an issue in chromedriver bug tracker,它描述了相同的行为。在某些情况下,不仅 TAB,而且 ENTER 和 SPACE 键开始失败。

阅读这些问题的评论得出的结论是,Chromium 源代码在处理输入事件方面发生了变化 (possible breaking diff)。

an issue in Chromium bug tracker aboit it, developers say that it has already been fixed, but it will take some time to get this fix into stable release of Chrome. If you are in a hurry, you should downgrade Chrome to a version below 44.0.2358.0 (source).

更新:

我最近有一个更新,TAB 键在 Chrome 44.0.2403.130 中再次工作。