当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript protractor.browser.driver类代码示例

本文整理汇总了TypeScript中protractor.browser.driver的典型用法代码示例。如果您正苦于以下问题:TypeScript browser.driver类的具体用法?TypeScript browser.driver怎么用?TypeScript browser.driver使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了browser.driver类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: it

    it('[C274687] Should upload with drag and drop only the extension filter allowed when Enable extension filter is enabled', () => {
        uploadToggles.enableExtensionFilter();
        browser.driver.sleep(1000);
        uploadToggles.addExtension('.docx');

        let dragAndDrop = new DropActions();
        let dragAndDropArea = element.all(by.css('adf-upload-drag-area div')).first();

        dragAndDrop.dropFile(dragAndDropArea, docxFileModel.location);
        contentServicesPage.checkContentIsDisplayed(docxFileModel.name);

        uploadDialog.removeUploadedFile(docxFileModel.name).fileIsCancelled(docxFileModel.name);
        uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();

        dragAndDrop.dropFile(dragAndDropArea, pngFileModel.location);
        contentServicesPage.checkContentIsNotDisplayed(pngFileModel.name);
        uploadDialog.dialogIsNotDisplayed();
        uploadToggles.disableExtensionFilter();
    });
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:19,代码来源:uploader-component.e2e.ts

示例2: beforeAll

    beforeAll(async (done) => {
        fileNames = Util.generateSequenceFiles(1, nrOfFiles, search.active.base, search.active.extension);
        adminFileNames = Util.generateSequenceFiles(nrOfFiles + 1, nrOfFiles + adminNrOfFiles, search.active.base, search.active.extension);
        search.active.firstFile = fileNames[0];
        search.active.secondFile = fileNames[1];
        fileNames.splice(0, 1);

        firstFileModel = new FileModel({
            'name': search.active.firstFile,
            'location': resources.Files.ADF_DOCUMENTS.TXT.file_location
        });

        let uploadActions = new UploadActions();

        this.alfrescoJsApi = new AlfrescoApi({
            provider: 'ECM',
            hostEcm: TestConfig.adf.url
        });

        await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);

        await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);

        await this.alfrescoJsApi.login(acsUser.id, acsUser.password);

        await uploadActions.createFolder(this.alfrescoJsApi, emptyFolderModel.name, '-my-');
        let newFolderModelUploaded = await uploadActions.createFolder(this.alfrescoJsApi, newFolderModel.name, '-my-');

        await uploadActions.createEmptyFiles(this.alfrescoJsApi, fileNames, newFolderModelUploaded.entry.id);

        await uploadActions.uploadFile(this.alfrescoJsApi, firstFileModel.location, firstFileModel.name, '-my-');

        await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);

        await uploadActions.createEmptyFiles(this.alfrescoJsApi, adminFileNames, newFolderModelUploaded.entry.id);

        browser.driver.sleep(15000);

        loginPage.loginToContentServicesUsingUserModel(acsUser);

        done();
    });
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:42,代码来源:search-page-component.e2e.ts

示例3: it

    it('[C268901] Should need a password when opening a protected file', () => {
        viewerPage.viewFile(protectedFile.name);

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

        viewerPage.checkZoomInButtonIsDisplayed();
        viewerPage.checkPasswordDialogIsDisplayed();
        viewerPage.checkPasswordSubmitDisabledIsDisplayed();

        viewerPage.enterPassword('random password');
        viewerPage.clickPasswordSubmit();
        viewerPage.checkPasswordErrorIsDisplayed();
        viewerPage.checkPasswordInputIsDisplayed();

        viewerPage.enterPassword(protectedFile.password);
        viewerPage.clickPasswordSubmit();
        viewerPage.checkFileContent('1', protectedFile.firstPageText);

        viewerPage.clickCloseButton();
    });
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:20,代码来源:viewer-content-services-component.e2e.ts

示例4: beforeAll

 beforeAll(function () {
     browser.driver.manage().deleteAllCookies();
     browser.wait(() => tribeCollection.drop()
         .then(() => tribeCollection.insert([
             {
                 id: 'e2e1',
                 name: 'E2E Example Tribe 1'
             }, {
                 id: 'e2e2',
                 name: 'E2E Example Tribe 2'
             }
         ]))
         .then(() => authorizeAllTribes())
         .then(() => tribeCollection.find({}, {}))
         .then(tribesInCollection => {
             tribeDocuments = tribesInCollection;
             return true;
         }));
     browser.get(hostName + '/test-login?username=' + userEmail + '&password="pw"');
 });
开发者ID:robertfmurdock,项目名称:Coupling,代码行数:20,代码来源:tribes.e2e.ts

示例5: it

    it('times out with a list of tasks', done => {
      browser.get(URL);
      browser.ignoreSynchronization = true;

      // Script that runs in the browser and calls whenStable with a timeout.
      let waitWithResultScript = function(done: any) {
        let rootEl = document.querySelector('example-app');
        let testability = window.getAngularTestability(rootEl);
        testability.whenStable((didWork: boolean, tasks: any) => { done(tasks); }, 1000);
      };

      element(by.css('.start-button')).click();

      browser.driver.executeAsyncScript(waitWithResultScript).then((result: any[]) => {
        let pendingTask = result[0];
        expect(pendingTask.data.delay).toEqual(5000);
        expect(pendingTask.source).toEqual('setTimeout');
        expect(element(by.css('.status')).getText()).not.toContain('done');
        done();
      });
    });
开发者ID:Cammisuli,项目名称:angular,代码行数:21,代码来源:testability_example_spec.ts

示例6: beforeAll

    beforeAll(async (done) => {

        this.alfrescoJsApi = new AlfrescoApi({
            provider: 'ECM',
            hostEcm: TestConfig.adf.url
        });

        await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);

        await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);

        await this.alfrescoJsApi.login(acsUser.id, acsUser.password);

        let firstFileUploaded = await uploadActions.uploadFile(this.alfrescoJsApi, firstFileModel.location, firstFileModel.name, '-my-');
        Object.assign(firstFileModel, firstFileUploaded.entry);

        fileHighlightUploaded = await this.alfrescoJsApi.nodes.addNode('-my-', {
            'name': Util.generateRandomString(16),
            'nodeType': 'cm:content',
            'properties': {
                'cm:title': term,
                'cm:description': 'Jadore les ' + term
            }
        });

        filesToDelete.push(fileHighlightUploaded);
        filesToDelete.push(firstFileUploaded);
        filesToDelete.push(await uploadActions.createFolder(this.alfrescoJsApi, firstFolderModel.name, '-my-'));
        filesToDelete.push(await uploadActions.createFolder(this.alfrescoJsApi, secondFolder.name, '-my-'));
        filesToDelete.push(await uploadActions.createFolder(this.alfrescoJsApi, thirdFolder.name, '-my-'));

        await browser.driver.sleep(15000); // wait search index previous file/folder uploaded

        loginPage.loginToContentServicesUsingUserModel(acsUser);

        done();
    });
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:37,代码来源:search-component.e2e.ts

示例7: beforeAll

    beforeAll(async (done) => {

        this.alfrescoJsApi = new AlfrescoApi({
            provider: 'ECM',
            hostEcm: TestConfig.adf.url
        });

        await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);

        await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);

        await this.alfrescoJsApi.login(acsUser.id, acsUser.password);

        file2Bytes = await uploadActions.uploadFile(this.alfrescoJsApi, file2BytesModel.location, file2BytesModel.name, '-my-');
        await browser.driver.sleep(15000);

        loginPage.loginToContentServices(acsUser.id, acsUser.password);

        searchDialog.checkSearchIconIsVisible()
            .clickOnSearchIcon()
            .enterTextAndPressEnter('*');

        done();
    });
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:24,代码来源:search-slider.e2e.ts

示例8: beforeAll

    beforeAll(async (done) => {

        this.alfrescoJsApi = new AlfrescoApi({
            provider: 'ECM',
            hostEcm: TestConfig.adf.url
        });

        await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);

        await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);

        await this.alfrescoJsApi.login(acsUser.id, acsUser.password);

        createdFolder = await this.alfrescoJsApi.nodes.addNode('-my-', {name: nodeNames.folder, nodeType: 'cm:folder'});
        createdFile = await this.alfrescoJsApi.nodes.addNode('-my-', {name: nodeNames.document, nodeType: 'cm:content'});

        await browser.driver.sleep(15000);

        loginPage.loginToContentServicesUsingUserModel(acsUser);

        browser.get(TestConfig.adf.url + '/search;q=' + randomName + '');

        done();
    });
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:24,代码来源:search-checkList.e2e.ts

示例9: it

 it('should delete a Clicker', () => {
   removeButton.click();
   browser.driver.sleep(1000);
   element.all(by.className('clickerList')).count()
     .then((count) => expect(count).toEqual(0));
 });
开发者ID:freehealthcare,项目名称:overwatchop,代码行数:6,代码来源:clickerList.e2e-spec.ts


注:本文中的protractor.browser.driver类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。