本文整理汇总了TypeScript中protractor.protractor.Key类的典型用法代码示例。如果您正苦于以下问题:TypeScript protractor.Key类的具体用法?TypeScript protractor.Key怎么用?TypeScript protractor.Key使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了protractor.Key类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should toggle between edit and view mode with ctrl+`', () => {
page.body().sendKeys(protractor.Key.chord(protractor.Key.CONTROL, '`'));
expect(page.isInEditMode()).toBeTruthy();
page.body().sendKeys(protractor.Key.chord(protractor.Key.CONTROL, '`'));
expect(page.isInEditMode()).toBeFalsy();
});
示例2: it
it('should focus before and after trigger when tabbing past items', () => {
page.pressKey(Key.ENTER);
page.pressKey(Key.TAB);
page.expectFocusOn(page.triggerTwo());
// navigate back to trigger
page.pressKey(protractor.Key.chord(protractor.Key.SHIFT, protractor.Key.TAB));
page.pressKey(Key.ENTER);
page.pressKey(protractor.Key.chord(protractor.Key.SHIFT, protractor.Key.TAB));
page.expectFocusOn(page.start());
});
示例3: it
it('should focus before and after trigger when tabbing past items', () => {
let shiftTab = protractor.Key.chord(Key.SHIFT, Key.TAB);
pressKeys(Key.ENTER, Key.TAB);
expectFocusOn(page.triggerTwo());
// navigate back to trigger
pressKeys(shiftTab, Key.ENTER, shiftTab);
expectFocusOn(page.start());
});