本文整理匯總了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();
});
示例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();
});
示例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();
});
示例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"');
});
示例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();
});
});
示例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();
});
示例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();
});
示例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();
});
示例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));
});