當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript browser.driver.wait方法代碼示例

本文整理匯總了TypeScript中protractor.browser.driver.wait方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript browser.driver.wait方法的具體用法?TypeScript browser.driver.wait怎麽用?TypeScript browser.driver.wait使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在protractor.browser.driver的用法示例。


在下文中一共展示了browser.driver.wait方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: insereDadosGoogle

 async insereDadosGoogle() {
     let inputEmail = 'input#identifierId';
     await browser.driver.wait(async () => await $(inputEmail).isPresent() && await $('.CwaK9 span.RveJvd.snByac').isPresent(), 30 * 1000);
     await browser.driver.findElement(by.css(inputEmail)).sendKeys('teste-professor-1@logoseducacao.com.br'+ protractor.Key.ENTER );
     await browser.sleep(1000);
     let inputPass = 'input[name=password]'
     await browser.driver.wait(() => $(inputPass).isPresent(), 30 * 1000);
     await browser.driver.findElement(by.css(inputPass)).sendKeys('professor123#'+ protractor.Key.ENTER);
     await browser.sleep(1000);
     await browser.driver.wait(async () => (await browser.driver.getCurrentUrl()).includes('class-daily'),30*1000);
 }
開發者ID:keviocastro,項目名稱:daily-ui,代碼行數:11,代碼來源:login.po.ts

示例2:

 button.click().then(() => {
   return browser.driver.wait(() => {
     return body.getAttribute('class').then(value => {
       return value === themeDefault;
     });
   }, 10000);
 });
開發者ID:kevinheader,項目名稱:nebular,代碼行數:7,代碼來源:layout-theme.e2e-spec.ts

示例3: it

 it('should redirect from / to setup', () => {
   browser.get('/');
   return browser.driver.wait(() => {
     return browser.driver.getCurrentUrl().then((url) => {
       return /setup/.test(url);
     });
   }, 10000);
 });
開發者ID:PloughingAByteField,項目名稱:tiatus,代碼行數:8,代碼來源:setup.e2e.ts

示例4: beforeEach

 beforeEach(async () => {
   await browser.get('/');
   return browser.driver.wait(function () {
       let until = protractor.ExpectedConditions;
       let elem = element(by.css('sd-home'));
       browser.wait(until.visibilityOf(elem), 10000);
       return elem;
   });
 });
開發者ID:baleboy,項目名稱:zephyrjs-ide,代碼行數:9,代碼來源:home.component.e2e-spec.ts

示例5: constructor

 constructor(filePath: string) {
   this.wrapped = browser.driver
     .wait(() => fs.existsSync(filePath))
     .then(() => {
       const graphString = fs.readFileSync(filePath, {encoding: 'utf8'});
       const graph = JSON.parse(graphString);
       return graph.elements;
     });
 }
開發者ID:lukaszkostrzewa,項目名稱:graphy,代碼行數:9,代碼來源:graph-promise.ts

示例6: myBeforeAll

export async function myBeforeAll() {
    await browser.get('/');
    browser.ignoreSynchronization = true;
    await browser.sleep(500);
    if (!await browser.executeScript('return window.localStorage.getItem("access_token")')) {
        if((await browser.driver.getCurrentUrl()).includes('/auth')) await browser.get('/auth');
        await browser.sleep(500);
        await waitRenderElement('.auth0-lock-submit');
        await browser.sleep(500);
        await browser.findElement(by.css("input[name=email]")).sendKeys('teste-professor-1@logoseducacao.com.br');
        await browser.sleep(500);// espera fim do preencimento
        await browser.findElement(by.css("input[type=password]")).sendKeys('professor');
        await browser.sleep(500);// espera fim do preencimento
        await browser.findElement(by.css('.auth0-lock-submit')).click();
        await browser.sleep(500);
        await browser.driver.wait(async () => (await browser.driver.getCurrentUrl()).includes('class-daily'),30*1000);
    }
}
開發者ID:keviocastro,項目名稱:daily-ui,代碼行數:18,代碼來源:shared.e2e.ts

示例7: waitForFileToExist

export function waitForFileToExist(filePath: string) {
    return browser.driver.wait(() => { return fs.existsSync(filePath); }, 30000);
}
開發者ID:GitWhiskey,項目名稱:composer,代碼行數:3,代碼來源:fileUtils.ts

示例8:

 .then(() => {
     return browser.driver.wait(() => {
         return fs.existsSync(__dirname + '/../downloads/' + cardName.split('@')[0] + '.card');
     }, Constants.shortWait);
 })
開發者ID:marlonprudente,項目名稱:composer,代碼行數:5,代碼來源:login.ts

示例9: navigateTo

export async function navigateTo(url: string) {
    await browser.get(url);
    await browser.driver.wait(async () => (await browser.driver.getCurrentUrl()).includes(url));
}
開發者ID:keviocastro,項目名稱:daily-ui,代碼行數:4,代碼來源:shared.e2e.ts


注:本文中的protractor.browser.driver.wait方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。