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


TypeScript element.ElementFinder類代碼示例

本文整理匯總了TypeScript中protractor/built/element.ElementFinder的典型用法代碼示例。如果您正苦於以下問題:TypeScript ElementFinder類的具體用法?TypeScript ElementFinder怎麽用?TypeScript ElementFinder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: shouldProjectBeLinked

      projectsPage.findProject(constants.otherProjectName).then((projectRow: ElementFinder) => {
        shouldProjectBeLinked(constants.otherProjectName, projectRow, false);
        shouldProjectHaveButtons(projectRow, true);

        // Now add the admin back to the project
        projectRow.element(by.id('managerButton')).click();
      });
開發者ID:sillsdev,項目名稱:web-languageforge,代碼行數:7,代碼來源:projects.e2e-spec.ts

示例2: return

 activityPage.activitiesList.filter((item: ElementFinder) => {
   // Look for activity items that do not contain our username
   return (item.getText().then((text: string) => {
     return text.indexOf(username) === -1;
   }));
 }).then((activityItems: ElementFinder[]) => {
開發者ID:,項目名稱:,代碼行數:6,代碼來源:

示例3:

 const shouldProjectHaveButtons = (projectRow: ElementFinder, bool: boolean) => {
   const addAsManagerBtn = projectRow.element(by.id('managerButton'));
   expect<any>(addAsManagerBtn.isDisplayed()).toBe(bool);
 };
開發者ID:sillsdev,項目名稱:web-languageforge,代碼行數:4,代碼來源:projects.e2e-spec.ts

示例4: addMachines

    async addMachines(machine) {
        const keys = Object.keys(machine);
        for( const key of keys) {
            //await this[key].waitForElement(1000);
            await this[key].sendKeys(machine[key]);
        };

        await this.buttonAddMachine.click();
    }
開發者ID:Vitaliy-1000,項目名稱:jsTresh,代碼行數:9,代碼來源:addMachines.ts

示例5: removeMachine

    async removeMachine() {
    
        const addMachines  = await this.valuesAddMachines.map(async (element) => {
            return await element.getText()   
            });

        await this.removeMachines.click();
        //await this.valuesAddMachines.waitForElements(1000);
        const newMachines  = await this.valuesAddMachines.map(async (element) => {
            return await element.getText()   
            });
        
        let checkedLength = false; 
        
        if(addMachines.length > newMachines.length) {
                checkedLength = true;
        };

            return checkedLength;
    }
開發者ID:Vitaliy-1000,項目名稱:jsTresh,代碼行數:20,代碼來源:addMachines.ts

示例6: filterMark

    async filterMark(textMachine) {
        await this.inputSortMark.sendKeys(textMachine);

        let EC = protractor.ExpectedConditions; 

        browser.wait(EC.elementToBeSelected($('.btn.btn-defult')), 5000);
        const but = await this.buttonFilter.get(0);
        await but.click();

        browser.wait(EC.elementToBeSelected($('.active.brand')), 5000);
        const addMachines  = await this.valuesAddMachines.map(async (element) => {
                return await element.getText()   
                });
        
        let endFilter = false;
        for(let i = 0; i < addMachines.length; i++) {
            if(textMachine == addMachines[i]) {
                endFilter = true;
                return endFilter;
            }
            
        }
        
    }
開發者ID:Vitaliy-1000,項目名稱:jsTresh,代碼行數:24,代碼來源:addMachines.ts

示例7: loginGo

 async loginGo(user: user ) {
     await this.username.sendKeys(user.username);
     await this.password.sendKeys(user.password);
     await $('.btn.btn-primary').click();
 }
開發者ID:Vitaliy-1000,項目名稱:jsTresh,代碼行數:5,代碼來源:login.ts


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