How to use the protractor.by.cssContainingText function in protractor

To help you get started, we’ve selected a few protractor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Alfresco / alfresco-ng2-components / lib / testing / src / lib / core / pages / data-table-component.page.ts View on Github external
async checkCellByHighlightContent(content: string): Promise {
        const cell = this.rootElement.element(by.cssContainingText(`adf-datatable-row[class*='adf-datatable-row'] div[class*='adf-name-location-cell-name'] span.adf-highlight`, content));
        await BrowserVisibility.waitUntilElementIsVisible(cell);
    }
github marklogic / marklogic-data-hub / quick-start / e2e / specs / create / create.ts View on Github external
await entityPage.getPropertyType(lastProperty).element(by.cssContainingText('option', 'string')).click();
      await entityPage.getPropertyDescription(lastProperty).sendKeys("this is a test property");
      //let's see if our values hold!
      expect(entityPage.getPropertyName(lastProperty).getAttribute('value')).toEqual("sku");
      expect(entityPage.hasClass(entityPage.getPropertyRangeIndex(lastProperty), 'active')).toBe(true);
      expect(entityPage.getPropertyType(lastProperty).getAttribute('value')).toEqual("24: string");
      expect(entityPage.getPropertyDescription(lastProperty).getAttribute('value')).toEqual("this is a test property");
      //let's add 1 more so we can remove one for the next test
      await entityPage.addProperty.click();
      //repoint last property to the new last property
      lastProperty = entityPage.lastProperty;
      expect(lastProperty.isDisplayed() && lastProperty.isDisplayed());
      //populate the fields for name, range index, type, and description
      await entityPage.getPropertyName(lastProperty).sendKeys("ID");
      await entityPage.getPropertyPrimaryKey(lastProperty).click();
      await entityPage.getPropertyType(lastProperty).element(by.cssContainingText('option', 'integer')).click();
      await entityPage.getPropertyDescription(lastProperty).sendKeys("this is our primary key");
      //let's save it now that it's populated
      await entityPage.saveEntity.click();
      browser.wait(EC.elementToBeClickable(entityPage.confirmDialogNoButton));
      expect(entityPage.confirmDialogNoButton.isDisplayed()).toBe(true);
      await entityPage.confirmDialogNoButton.click();
    });
github Alfresco / alfresco-content-app / e2e / components / menu / menu.ts View on Github external
editFolder: `.mat-menu-item[id$='editFolder']`,
    favoriteAction: `.mat-menu-item[id$='favorite.add']`,
    removeFavoriteAction: `.mat-menu-item[id$='favorite.remove']`,
    editOffline: `.mat-menu-item[title='Edit Offline']`,
    cancelEditing: `.mat-menu-item[title='Cancel Editing']`
  };

  items: ElementArrayFinder = this.component.all(by.css(Menu.selectors.item));
  backdrop: ElementFinder = browser.element(by.css('.cdk-overlay-backdrop'));
  uploadFiles: ElementFinder = browser.element(by.id(Menu.selectors.uploadFiles));
  submenus: ElementArrayFinder = browser.element.all(by.css(Menu.selectors.submenu));

  cancelEditingAction: ElementFinder = this.component.element(by.css(Menu.selectors.cancelEditing));
  cancelJoinAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Cancel Join'));
  copyAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Copy'));
  createFolderAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Create Folder'));
  createLibraryAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Create Library'));
  deleteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Delete'));
  downloadAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Download'));
  editFolderAction: ElementFinder = this.component.element(by.css(Menu.selectors.editFolder));
  editOfflineAction: ElementFinder = this.component.element(by.css(Menu.selectors.editOffline));
  favoriteAction: ElementFinder = this.component.element(by.css(Menu.selectors.favoriteAction));
  removeFavoriteAction: ElementFinder = this.component.element(by.css(Menu.selectors.removeFavoriteAction));
  toggleFavoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Favorite'));
  toggleRemoveFavoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Remove Favorite'));
  joinAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Join'));
  leaveAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Leave'));
  managePermissionsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Permissions'));
  manageVersionsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Manage Versions'));
  uploadNewVersionAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Upload New Version'));
  moveAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Move'));
  permanentDeleteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Permanently Delete'));
github rackerlabs / encore-ui / utils / rx-page-objects / src / rxSelectFilter.page.ts View on Github external
multiSelectByLabel(label: string): rxMultiSelect {
        let selectWrapper = this.element(by.cssContainingText('.select-wrapper', label));
        return new rxMultiSelect(selectWrapper.$('rx-multi-select'));
    }
github marklogic / marklogic-data-hub / web / e2e / page-objects / steps / masteringStep.ts View on Github external
mergeOptionDialogPropertyOptions(option: string) {
    return element(by.cssContainingText('mat-option .mat-option-text', option));
  }
github Alfresco / alfresco-content-app / e2e / components / menu / menu.ts View on Github external
removeFavoriteAction: `.mat-menu-item[id$='favorite.remove']`,
    editOffline: `.mat-menu-item[title='Edit Offline']`,
    cancelEditing: `.mat-menu-item[title='Cancel Editing']`
  };

  items: ElementArrayFinder = this.component.all(by.css(Menu.selectors.item));
  backdrop: ElementFinder = browser.element(by.css('.cdk-overlay-backdrop'));
  uploadFiles: ElementFinder = browser.element(by.id(Menu.selectors.uploadFiles));
  submenus: ElementArrayFinder = browser.element.all(by.css(Menu.selectors.submenu));

  cancelEditingAction: ElementFinder = this.component.element(by.css(Menu.selectors.cancelEditing));
  cancelJoinAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Cancel Join'));
  copyAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Copy'));
  createFolderAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Create Folder'));
  createLibraryAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Create Library'));
  deleteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Delete'));
  downloadAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Download'));
  editFolderAction: ElementFinder = this.component.element(by.css(Menu.selectors.editFolder));
  editOfflineAction: ElementFinder = this.component.element(by.css(Menu.selectors.editOffline));
  favoriteAction: ElementFinder = this.component.element(by.css(Menu.selectors.favoriteAction));
  removeFavoriteAction: ElementFinder = this.component.element(by.css(Menu.selectors.removeFavoriteAction));
  toggleFavoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Favorite'));
  toggleRemoveFavoriteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Remove Favorite'));
  joinAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Join'));
  leaveAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Leave'));
  managePermissionsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Permissions'));
  manageVersionsAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Manage Versions'));
  uploadNewVersionAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Upload New Version'));
  moveAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Move'));
  permanentDeleteAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Permanently Delete'));
  restoreAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Restore'));
  shareAction: ElementFinder = this.component.element(by.cssContainingText(Menu.selectors.item, 'Share'));
github marklogic / marklogic-data-hub / quick-start / e2e / page-objects / flows / flows.ts View on Github external
get jsonDataFormatButton() {
    return element(by.cssContainingText('app-select-list td', 'JSON'));
  }
github marklogic / marklogic-data-hub / web / e2e / page-objects / jobs / manageJobs.ts View on Github external
flowNameFilterOptions(option: string) {
    return element(by.cssContainingText('mat-option .mat-option-text', option)); 
  }
github SAP / cloud-commerce-spartacus-storefront / projects / storefrontapp-e2e / src / e2e-util.ts View on Github external
static async selectNgSelectOptionByText(
    selectElement: ElementFinder,
    text: string
  ) {
    selectElement.element(by.css('.ng-select-container')).click();
    await this.wait4VisibleElement(element(by.css('.ng-dropdown-panel-items')));

    return selectElement
      .all(by.cssContainingText('.ng-option', text))
      .first()
      .click();
  }
github marklogic / marklogic-data-hub / web / e2e / page-objects / steps / ingestStep.ts View on Github external
sourceFileTypeOptions(option: string) {
    return element(by.cssContainingText('mat-option .mat-option-text', option));
  }