How to use the protractor.browser.driver function in protractor

To help you get started, we’ve selected a few protractor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sillsdev / web-languageforge / test / app / languageforge / lexicon / editor / editor-entry.e2e-spec.ts View on Github external
it('setup: click on word with multiple definitions (found by lexeme)', () => {
    editorPage.edit.findEntryByLexeme(constants.testMultipleMeaningEntry1.lexeme.th.value).click();

    // fix problem with protractor not scrolling to element before click
    browser.driver.executeScript('arguments[0].scrollIntoView();',
      editorPage.edit.senses.first().getWebElement());
    editorPage.edit.senses.first().click();
  });
github Alfresco / generator-ng2-alfresco-app / e2e / generator_component.e2e.ts View on Github external
it('[C260498] Check viewer for a generated app', () => {

    let viewerUrl = TestConfig.adf.url + TestConfig.adf.port + `/documentlist(overlay:files/${pdfFile.id}/view)`;

    browser.driver.get(viewerUrl);
    browser.driver.sleep(3000); // wait open file

    viewerPage.checkFileContent('1', pdfFile.firstPageText);
    viewerPage.checkCloseButtonIsDisplayed();
    viewerPage.clickCloseButton();
  });
github angular / protractor-cookbook / protractor-typescript-cucumber / config / config.ts View on Github external
onPrepare: () => {
    browser.driver.manage().window().maximize();
  },
  // These are various cucumber compiler options
github Nolanus / ngx-page-scroll / e2e / src / nested-scroll.e2e-spec.ts View on Github external
' and advanced position calculation when the container is scrolled to the bottom', () => {
    // Cause the scroll container to be scrolled to the end
    browser.driver.executeScript('document.getElementById(\'complexContainer\').scrollTop =' +
      ' document.getElementById(\'complexContainer\').scrollHeight');

    page.getComplexContainerScrollTop().then((initialScrollTop: number) => {
      expect(initialScrollTop).toBeGreaterThan(0);
      page.triggerNestedScrollButton2().then(() => {
        browser.sleep(1250).then(() => {
          protractor.promise.all([page.getComplexContainerTargetVerticalPosition(), page.getComplexScrollTargetVerticalPosition()])
            .then(locations => {
              expect(locations[0]).toBeCloseTo(locations[1], Closeness.ofByOne);
            });
        });
      });
    });
  });
github tmobile / jazz / core / jazz_ui / e2e / 04-jazzservices / jazzservices.e2e-spec.ts View on Github external
function serviceapprover() {
    browser.driver.sleep(5000);
    jazzServices_po.getSubmit().click();
    fluentwaittry(jazzServices_po.getDone(), 15000);
    jazzServices_po.getDone().click();
  }
  function waitForSpinnerDisappear() {
github syndesisio / syndesis-ui / e2e / common / common.steps.ts View on Github external
const size = await browser.manage().window().getSize();
    const directions: Object = {
      top: 0,
      bottom: size.height,
      left: 0,
      right: size.width,
    };
    if (!directions.hasOwnProperty(topBottom) || !directions.hasOwnProperty(leftRight)) {
      return P.reject(`unknown directions [${topBottom}, ${leftRight}`);
    }
    const x = directions[leftRight];
    const y = directions[topBottom];

    log.info(`scrolling to [x=${x},y=${y}]`);
    return browser.driver.executeScript((browserX, browserY) => window.scrollTo(browserX, browserY), x, y);
  }
}
github tmobile / jazz / core / jazz_ui / e2e / 04-apiservices / apiservices.e2e-spec.ts View on Github external
afterAll(() => {
    jazzServices_po = new Jazz();
    commonUtils = new Common();
    browser.driver.sleep(Common.miniWait);
    jazzServices_po.logoutIcon().click();
    jazzServices_po.logout().click();
  });
github bwsw / cloudstack-ui / e2e / sg-creation.e2e-spec.ts View on Github external
beforeAll(() => {
    browser.driver
      .manage()
      .window()
      .maximize();
    login = new Login();
    login.navigateTo('/');
    login.login();
    login.waitRedirect('instances');
  });
github Alfresco / alfresco-ng2-components / e2e / process-services-cloud / edit-process-filters-component.e2e.ts View on Github external
await browser.driver.sleep(1000);

            await processCloudDemoPage.editProcessFilterCloudComponent().openFilter();
            await processCloudDemoPage.editProcessFilterCloudComponent().checkCustomiseFilterHeaderIsExpanded();
            await expect(await processCloudDemoPage.getActiveFilterName()).toBe('New');
            await expect(await processCloudDemoPage.editProcessFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Id');
            await processCloudDemoPage.editProcessFilterCloudComponent().setSortFilterDropDown('Name');
            await expect(await processCloudDemoPage.editProcessFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Name');
            await processCloudDemoPage.editProcessFilterCloudComponent().clickSaveAsButton();

            await processCloudDemoPage.editProcessFilterCloudComponent().editProcessFilterDialog().setFilterName('New');
            await processCloudDemoPage.editProcessFilterCloudComponent().editProcessFilterDialog().clickOnSaveButton();
            await processCloudDemoPage.editProcessFilterCloudComponent().openFilter();
            await processCloudDemoPage.editProcessFilterCloudComponent().checkCustomiseFilterHeaderIsExpanded();

            await browser.driver.sleep(1000);

            await expect(await processCloudDemoPage.getActiveFilterName()).toBe('New');
            await expect(await processCloudDemoPage.editProcessFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Name');
            await processCloudDemoPage.editProcessFilterCloudComponent().clickDeleteButton();

            await browser.driver.sleep(1000);

            await processCloudDemoPage.customProcessFilter('custom-new').clickProcessFilter();
            await processCloudDemoPage.editProcessFilterCloudComponent().openFilter();
            await processCloudDemoPage.editProcessFilterCloudComponent().checkCustomiseFilterHeaderIsExpanded();
            await expect(await processCloudDemoPage.editProcessFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Id');
            await processCloudDemoPage.editProcessFilterCloudComponent().clickDeleteButton();
        });