当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript browser.actions方法代码示例

本文整理汇总了TypeScript中protractor.browser.actions方法的典型用法代码示例。如果您正苦于以下问题:TypeScript browser.actions方法的具体用法?TypeScript browser.actions怎么用?TypeScript browser.actions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在protractor.browser的用法示例。


在下文中一共展示了browser.actions方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: it

    it('should display context menu on right click with proper elements in view mode', () => {
      browser.actions().mouseMove(page.graphContainer(), {x: 0, y: 0}).perform();

      browser.actions().click(protractor.Button.RIGHT).perform();

      expect(page.contextMenu().getCssValue('display')).toEqual('block');
      expect(page.visibleContextMenuItems().map(e => e.getAttribute('id')))
        .toEqual(['select-all', 'copy', 'cut', 'paste', 'undo', 'redo']);
    });
开发者ID:lukaszkostrzewa,项目名称:graphy,代码行数:9,代码来源:app.e2e-spec.ts

示例2: it

 it ('Check tooltip texts: ' + description, () => {
   inputDynamicPopupText.clear();
   inputDynamicPopupText.sendKeys(data.inputText);
   browser.actions()
     .mouseMove(tooltipDynamic as any)
     .perform();
   expect(tooltipElement.getText()).toBe(data.inputText);
   browser.actions()
     .mouseMove(inputDynamicTooltipText as any)
     .perform();
 });
开发者ID:yusijs,项目名称:ng2-bootstrap,代码行数:11,代码来源:tooltip-demo.e2e-spec.ts

示例3: it

  it('Append to body.', () => {
    browser.actions()
      .mouseMove(tooltipEl.buttonDefaultTooltip)
      .perform();
    expect(tooltipEl.tooltipElement.isPresent()).toBe(true);

    browser.actions()
      .mouseMove(tooltipEl.buttonAppendedToBody)
      .perform();
    expect(tooltipEl.tooltipElement.isPresent()).toBe(true);
  });
开发者ID:Zuiago,项目名称:ngx-bootstrap,代码行数:11,代码来源:tooltip-demo.e2e-spec.ts

示例4: expect

      input.getSize().then((size) => {
        browser.actions()
            .mouseMove(input, {x: size.width - 5, y: 5})
            .click()
            .perform();

        expect(input.getAttribute('value')).toBe('1');

        browser.actions()
            .mouseMove(input, {x: size.width - 5, y: size.height - 5})
            .click()
            .perform();

        expect(input.getAttribute('value')).toBe('0');
      });
开发者ID:Daniel-McK,项目名称:material2,代码行数:15,代码来源:input.e2e.ts

示例5: it

 it('Static modal does not close by misclick', () => {
   browser.actions()
     .mouseMove({ x: 0, y: 0 })
     .click()
     .perform();
   expect(modalWindow.isDisplayed()).toBe(true);
 });
开发者ID:Zuiago,项目名称:ngx-bootstrap,代码行数:7,代码来源:modals-demo.e2e-spec.ts

示例6: it

  it('should login a test user', () => {
    const submitButton = getSubmitButton();
    browser.wait(until.presenceOf(submitButton), 10000, 'submit button taking too long to appear in the DOM');

    let emailInput = element(by.id('username'));
    let passwordInput = element(by.id('password'));
    browser.wait(until.visibilityOf(emailInput), 10000, 'Email input taking too long to appear in the DOM');
    browser.wait(until.visibilityOf(passwordInput), 10000, 'Password input taking too long to appear in the DOM');
    emailInput.sendKeys(testDataJson.username);
    passwordInput.sendKeys(testDataJson.password);

    expect(emailInput.isPresent()).toBe(true, 'email input not present');
    expect(passwordInput.isPresent()).toBe(true, 'password input not present');
    expect(submitButton.isPresent()).toBe(true, 'login button not present');
    browser.actions().mouseMove(submitButton).click().perform()
      .then(
        () => {
          browser.waitForAngular();
          browser.driver.sleep(5000); // This is important, otherwise the following fails!
          browser.wait(dashboardVisited, 10000, 'Dashboard page taking too long to load');
          browser.executeScript('return window.localStorage.getItem("access_token")')
            .then(
              (token: string) => {
                expect(token !== null && token.length > 3).toBe(true, 'no access token set: ' + token);
              }
            ).catch(
              () => {
                fail('Login failed: no access token');
              }
            );
        }
      );
  });
开发者ID:HiP-App,项目名称:HiP-CmsAngularApp,代码行数:33,代码来源:login.component.e2e-spec.ts

示例7: deleteComment

 deleteComment() {
   let scrollToEle = element.all(by.css('.comment-container')).get(0);
   let trashIcon = element.all(by.css('.fa.fa-trash-o')).get(0);
   browser.actions().mouseMove(scrollToEle).perform().then(() => waitForElementVisibility(trashIcon))
   .then(() => trashIcon.click())
   .then(() => waitForElementVisibility(element(by.css('.modal-backdrop'))));
 }
开发者ID:JonZeolla,项目名称:incubator-metron,代码行数:7,代码来源:alert-details.po.ts


注:本文中的protractor.browser.actions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。