How to use the protractor.browser.sleep 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 marklogic / marklogic-data-hub / web / e2e / specs / entities / entity.ts View on Github external
it('should create a new Order entity', async function () {
      await appPage.entitiesTab.click();
      //create Order entity
      await console.log('create Order entity');
      await entityPage.toolsButton.click();
      await entityPage.newEntityButton.click();
      await browser.sleep(2000);
      expect(entityPage.entityEditor.isDisplayed()).toBe(true);
      await entityPage.entityTitle.sendKeys('Order');
      await entityPage.saveEntity.click();
      await browser.wait(EC.elementToBeClickable(entityPage.confirmDialogYesButton));
      expect(entityPage.confirmDialogYesButton.isDisplayed()).toBe(true);
      await entityPage.confirmDialogYesButton.click();
      await browser.wait(EC.visibilityOf(entityPage.getEntityBox('Order')));
      expect(entityPage.getEntityBox('Order').isDisplayed()).toBe(true);
      await entityPage.toolsButton.click();
      // move entity Order
      await entityPage.selectEntity('Order');
      await browser.actions().dragAndDrop(entityPage.entityBox('Order'), {x: 200, y: 150}).perform();
    });
github Gapminder / gapminder-offline / e2e / lineChart / line-chart.e2e-spec.ts View on Github external
it('Lines opacity should not get lost when timeslider is playing', async () => {
    await lineChart.selectLine('China');
    await CommonChartPage.buttonPlay.safeClick();
    await browser.sleep(2000); // play slider for 2 seconds to get the value in movement

    expect(await lineChart.countHighlightedLines()).toEqual(1);

    await CommonChartPage.buttonPause.safeClick();
    expect(await lineChart.countHighlightedLines()).toEqual(1);
  });
github angular / angular / modules / playground / e2e_test / web_workers / animations / animations_spec.ts View on Github external
waitForBootstrap();

    const elem = element(by.css(selector + ' .box'));
    const btn = element(by.css(selector + ' button'));
    const getWidth = () => elem.getSize().then((sizes: any) => sizes['width']);

    btn.click();

    browser.sleep(250);

    btn.click();

    expect(getWidth()).toBeLessThan(600);

    browser.sleep(500);

    expect(getWidth()).toBeLessThan(50);
  });
github Activiti / activiti-modeling-app / projects / ama-testing / src / e2e / pages / process-content.page.ts View on Github external
async selectModelerEditorTab(): Promise {
        await BrowserActions.click(this.modelerEditorTabButton);
        await browser.sleep(300);
    }
github tmobile / jazz / core / jazz_ui / e2e / 07-slsappservices / slsappservices.e2e-spec.ts View on Github external
browser.switchTo().window(handles[0]).then(function () {
       browser.sleep(Common.microWait);
       waitforskiptest(jazzServices_po.activeTestBranch(), Common.xxlWait);
       jazzServices_po.activeTestBranch().click().
        then(null, function (err) {
         console.log("the error occurred is : " + err.name);
        });
       commonUtils.waitForSpinnerDisappear();
       browser.sleep(Common.miniWait);
      });
     });
github tmobile / jazz / core / jazz_ui / e2e / 08-multiaccountservices / secondeastservices.e2e-spec.ts View on Github external
jazzServices_po.getGitLogout().click().then(null, function (err) {
          console.log("Unable to locate Logout link"+err.name);
          flag = 0;
          browser.sleep(Common.longWait);
          browser.close();
         });
         browser.sleep(Common.microWait);
github tmobile / jazz / core / jazz_ui / e2e / 05-lambdaservices / lambdaservices.e2e-spec.ts View on Github external
browser.sleep(Common.microWait);
            jazzServices_po.btn_CreateBranch().click().then(null, function (err) {
              console.log(err.name);
            });
            browser.sleep(Common.microWait);
            jazzServices_po.getBitLogoutIcon().click().then(null, function (err) {
              console.log(err.name);
            });
            browser.sleep(Common.microWait);
            jazzServices_po.getBitLogout().click().then(null, function (err) {
              console.log(err.name);
              flag = 0;
              browser.sleep(Common.longWait);
              browser.close();
            });
            browser.sleep(Common.microWait);
            browser.close();
          }
        });
      });
github primefaces / primeng / e2e / src / fieldset.e2e-spec.ts View on Github external
it('should toggle content', () => {
            legend.click();
            browser.sleep(1000);
            legend.click();
            expect(contentWrapper.get(1).getCssValue('height')).not.toBe('0');
        });
github antonybudianto / angular-starter / e2e / home / home.spec.ts View on Github external
it('should have image', () => {
        browser.sleep(1000);
        let ng2Img = element(by.css('img'));
        expect(ng2Img.isDisplayed()).toBeTruthy();
    });
});
github marklogic / marklogic-data-hub / web / e2e / page-objects / flows / manageFlows.ts View on Github external
async clickAdvSettingsExpandCollapse() {
    await browser.sleep(1000);
    await console.log("CLicking advance settings");
    return await this.advSettingsExpandCollapse.click();
  }