当前位置: 首页>>代码示例>>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;未经允许,请勿转载。